Fix decoding of some pages
This commit is contained in:
parent
63f24c7b59
commit
fa77a3b323
2 changed files with 5 additions and 5 deletions
|
|
@ -52,7 +52,7 @@ def get_synos(word):
|
|||
page = web.getURLContent(url)
|
||||
if page is not None:
|
||||
synos = list()
|
||||
for line in page.decode().split("\n"):
|
||||
for line in page.split("\n"):
|
||||
if re.match("[ \t]*<tr[^>]*>.*</tr>[ \t]*</table>.*", line) is not None:
|
||||
for elt in re.finditer(">&[^;]+;([^&]*)&[^;]+;<", line):
|
||||
synos.append(elt.group(1))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue