From 23bc346ce8d25d38c5801e8b7378d1f09826d5a6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 16 Jul 2019 08:27:17 +0530 Subject: [PATCH] Maybe Sports Illustrated needs Accept-Language --- recipes/sports_illustrated.recipe | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipes/sports_illustrated.recipe b/recipes/sports_illustrated.recipe index 869fab7f20..9218990b98 100644 --- a/recipes/sports_illustrated.recipe +++ b/recipes/sports_illustrated.recipe @@ -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'