mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update New York Times
This commit is contained in:
parent
ded06e6b00
commit
bab192fa6c
@ -219,9 +219,10 @@ class NewYorkTimes(BasicNewsRecipe):
|
|||||||
|
|
||||||
container = soup.find(itemtype='http://schema.org/CollectionPage')
|
container = soup.find(itemtype='http://schema.org/CollectionPage')
|
||||||
highlights = container.find('section', **classes('highlights'))
|
highlights = container.find('section', **classes('highlights'))
|
||||||
for article in self.parse_highlights(highlights):
|
if highlights is not None:
|
||||||
log(article)
|
for article in self.parse_highlights(highlights):
|
||||||
yield article
|
log(article)
|
||||||
|
yield article
|
||||||
extra = container.find('section', attrs={'data-collection-type': True})
|
extra = container.find('section', attrs={'data-collection-type': True})
|
||||||
if extra is not None:
|
if extra is not None:
|
||||||
title = self.tag_to_string(extra.find('h2'))
|
title = self.tag_to_string(extra.find('h2'))
|
||||||
|
@ -219,9 +219,10 @@ class NewYorkTimes(BasicNewsRecipe):
|
|||||||
|
|
||||||
container = soup.find(itemtype='http://schema.org/CollectionPage')
|
container = soup.find(itemtype='http://schema.org/CollectionPage')
|
||||||
highlights = container.find('section', **classes('highlights'))
|
highlights = container.find('section', **classes('highlights'))
|
||||||
for article in self.parse_highlights(highlights):
|
if highlights is not None:
|
||||||
log(article)
|
for article in self.parse_highlights(highlights):
|
||||||
yield article
|
log(article)
|
||||||
|
yield article
|
||||||
extra = container.find('section', attrs={'data-collection-type': True})
|
extra = container.find('section', attrs={'data-collection-type': True})
|
||||||
if extra is not None:
|
if extra is not None:
|
||||||
title = self.tag_to_string(extra.find('h2'))
|
title = self.tag_to_string(extra.find('h2'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user