mirror of
https://github.com/simon987/od-database.git
synced 2025-04-20 02:46:45 +00:00
Another fix for encoding problems
This commit is contained in:
parent
788d3749d4
commit
677bfa03ea
@ -151,7 +151,7 @@ class HttpDirectory(RemoteDirectory):
|
|||||||
try:
|
try:
|
||||||
r = self.session.get(url, stream=True, timeout=40)
|
r = self.session.get(url, stream=True, timeout=40)
|
||||||
for chunk in r.iter_content(chunk_size=4096):
|
for chunk in r.iter_content(chunk_size=4096):
|
||||||
yield chunk.decode(r.encoding, errors="ignore")
|
yield chunk.decode(r.encoding if r.encoding else "utf-8", errors="ignore")
|
||||||
r.close()
|
r.close()
|
||||||
del r
|
del r
|
||||||
break
|
break
|
||||||
|
Loading…
x
Reference in New Issue
Block a user