mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-29 10:07:08 +01:00
Update New York Times
This commit is contained in:
parent
ded06e6b00
commit
bab192fa6c
2 changed files with 8 additions and 6 deletions
|
|
@ -219,9 +219,10 @@ def log(article):
|
|||
|
||||
container = soup.find(itemtype='http://schema.org/CollectionPage')
|
||||
highlights = container.find('section', **classes('highlights'))
|
||||
for article in self.parse_highlights(highlights):
|
||||
log(article)
|
||||
yield article
|
||||
if highlights is not None:
|
||||
for article in self.parse_highlights(highlights):
|
||||
log(article)
|
||||
yield article
|
||||
extra = container.find('section', attrs={'data-collection-type': True})
|
||||
if extra is not None:
|
||||
title = self.tag_to_string(extra.find('h2'))
|
||||
|
|
|
|||
|
|
@ -219,9 +219,10 @@ def log(article):
|
|||
|
||||
container = soup.find(itemtype='http://schema.org/CollectionPage')
|
||||
highlights = container.find('section', **classes('highlights'))
|
||||
for article in self.parse_highlights(highlights):
|
||||
log(article)
|
||||
yield article
|
||||
if highlights is not None:
|
||||
for article in self.parse_highlights(highlights):
|
||||
log(article)
|
||||
yield article
|
||||
extra = container.find('section', attrs={'data-collection-type': True})
|
||||
if extra is not None:
|
||||
title = self.tag_to_string(extra.find('h2'))
|
||||
|
|
|
|||
Loading…
Reference in a new issue