mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
3048b56905
commit
766a7faeb6
@ -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'),
|
||||
|
@ -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'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user