mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-01 02:46:04 +01:00
Update New York Times
This commit is contained in:
parent
a370e028a3
commit
2862b4cdd2
2 changed files with 10 additions and 16 deletions
|
|
@ -266,14 +266,11 @@ def log(article):
|
|||
if article.get('description'):
|
||||
self.log('\t\t', article['description'])
|
||||
|
||||
container = soup.find(itemtype='http://schema.org/CollectionPage')
|
||||
container.find('header').extract()
|
||||
div = container.find('div')
|
||||
for section in div.findAll('section'):
|
||||
for ol in section.findAll('ol'):
|
||||
for article in self.parse_article_group(ol):
|
||||
log(article)
|
||||
yield article
|
||||
container = soup.find(id='collection-{}'.format(slug)).find('section')
|
||||
for ol in container.findAll('ol'):
|
||||
for article in self.parse_article_group(ol):
|
||||
log(article)
|
||||
yield article
|
||||
|
||||
def parse_web_sections(self):
|
||||
self.read_nyt_metadata()
|
||||
|
|
|
|||
|
|
@ -266,14 +266,11 @@ def log(article):
|
|||
if article.get('description'):
|
||||
self.log('\t\t', article['description'])
|
||||
|
||||
container = soup.find(itemtype='http://schema.org/CollectionPage')
|
||||
container.find('header').extract()
|
||||
div = container.find('div')
|
||||
for section in div.findAll('section'):
|
||||
for ol in section.findAll('ol'):
|
||||
for article in self.parse_article_group(ol):
|
||||
log(article)
|
||||
yield article
|
||||
container = soup.find(id='collection-{}'.format(slug)).find('section')
|
||||
for ol in container.findAll('ol'):
|
||||
for article in self.parse_article_group(ol):
|
||||
log(article)
|
||||
yield article
|
||||
|
||||
def parse_web_sections(self):
|
||||
self.read_nyt_metadata()
|
||||
|
|
|
|||
Loading…
Reference in a new issue