mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-28 06:04:42 +02:00
...
This commit is contained in:
parent
3048b56905
commit
766a7faeb6
2 changed files with 2 additions and 2 deletions
|
|
@ -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…
Reference in a new issue