fix decode bug

This commit is contained in:
liuerfire 2014-01-05 02:29:50 +08:00
parent 627209b149
commit afdf7d2587

View File

@ -192,7 +192,7 @@ def get_decoded_html(url, faker = False):
data = response.data
charset = r1(r'charset=([\w-]+)', response.headers['content-type'])
if charset:
return data.decode(charset)
return data.decode(charset, 'ignore')
else:
return data