This commit is contained in:
Kovid Goyal 2018-05-21 21:30:47 +05:30
parent 3048b56905
commit 766a7faeb6
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 2 additions and 2 deletions

View File

@ -96,7 +96,7 @@ class NewYorkTimes(BasicNewsRecipe):
def preprocess_html(self, soup):
article = soup.find(id='story')
# The NYT is apparently A/B testing a new page layout
has_supplemental = article.find(**classes('story-body-supplemental')) is not None
has_supplemental = article is not None and article.find(**classes('story-body-supplemental')) is not None
if has_supplemental:
keep_only_tags = [
dict(id='story-header'),

View File

@ -96,7 +96,7 @@ class NewYorkTimes(BasicNewsRecipe):
def preprocess_html(self, soup):
article = soup.find(id='story')
# The NYT is apparently A/B testing a new page layout
has_supplemental = article.find(**classes('story-body-supplemental')) is not None
has_supplemental = article is not None and article.find(**classes('story-body-supplemental')) is not None
if has_supplemental:
keep_only_tags = [
dict(id='story-header'),