mirror of
https://github.com/simon987/od-database.git
synced 2025-04-19 02:16:47 +00:00
Attempt to fix Unicode errors part two
This commit is contained in:
parent
c309aa25c8
commit
86144935e3
@ -113,7 +113,7 @@ class HttpDirectory(RemoteDirectory):
|
||||
for link in links:
|
||||
result.append((link.text, link.get("href")))
|
||||
except UnicodeDecodeError:
|
||||
tree = etree.HTML(body.decode("utf-8", errors="ignore"), parser=self.parser)
|
||||
tree = etree.HTML(body.decode("utf-8", errors="ignore").encode("utf-8"), parser=self.parser)
|
||||
links = []
|
||||
try:
|
||||
links = tree.findall(".//a/[@href]")
|
||||
|
Loading…
x
Reference in New Issue
Block a user