Maybe Sports Illustrated needs Accept-Language

This commit is contained in:
Kovid Goyal 2019-07-16 08:27:17 +05:30
parent 2a6e7ea82d
commit 23bc346ce8
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -32,6 +32,11 @@ class SI(BasicNewsRecipe):
dict(name='meta'),
]
def get_browser(self, *args, **kwargs):
br = BasicNewsRecipe.get_browser(self, *args, **kwargs)
br.addheaders += [('Accept-Language', 'en')]
return br
def preprocess_html(self, soup, *a):
for tag in soup.findAll(attrs={'data-src': True}):
tag.name = 'img'