mirror of
https://github.com/soimort/you-get.git
synced 2025-03-13 03:17:44 +03:00
fix decode bug
This commit is contained in:
parent
627209b149
commit
afdf7d2587
@ -192,7 +192,7 @@ def get_decoded_html(url, faker = False):
|
|||||||
data = response.data
|
data = response.data
|
||||||
charset = r1(r'charset=([\w-]+)', response.headers['content-type'])
|
charset = r1(r'charset=([\w-]+)', response.headers['content-type'])
|
||||||
if charset:
|
if charset:
|
||||||
return data.decode(charset)
|
return data.decode(charset, 'ignore')
|
||||||
else:
|
else:
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user