boobot: Force shitty Windows encoding
Because web browsers actually do that! Test URL: http://www.universfreebox.com/article/20715/Deutche-Telekom-met-fin-a-l-internet-illimite-bientot-le-tour-de-la-France
This commit is contained in:
parent
ab7287747a
commit
1b2031796b
1 changed files with 1 additions and 1 deletions
|
|
@ -101,7 +101,7 @@ class BoobotBrowser(StandardBrowser):
|
|||
title = None
|
||||
if is_html:
|
||||
r = self.openurl(url)
|
||||
encoding = EncodingFinder('windows-1252').encoding(r)
|
||||
encoding = EncodingFinder('windows-1252').encoding(r).lower().replace('iso-8859-1', 'windows-1252')
|
||||
h = self.get_document(r, parser='lxml', encoding=encoding)
|
||||
for title in h.xpath('//head/title'):
|
||||
title = to_unicode(title.text_content())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue