mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update NYTimes Book Review
This commit is contained in:
parent
d82e5ee81d
commit
009f8f33ad
@ -62,7 +62,7 @@ class NewYorkTimesBookReview(BasicNewsRecipe):
|
|||||||
main_articles, articles = [], []
|
main_articles, articles = [], []
|
||||||
feeds = [('Features', main_articles), ('Latest', articles)]
|
feeds = [('Features', main_articles), ('Latest', articles)]
|
||||||
for li in toc.findAll('li'):
|
for li in toc.findAll('li'):
|
||||||
h2 = li.find('h2')
|
h2 = li.find(['h2', 'h3'])
|
||||||
a = h2.find('a', href=True)
|
a = h2.find('a', href=True)
|
||||||
if a is not None:
|
if a is not None:
|
||||||
title = self.tag_to_string(a)
|
title = self.tag_to_string(a)
|
||||||
@ -77,7 +77,7 @@ class NewYorkTimesBookReview(BasicNewsRecipe):
|
|||||||
if desc:
|
if desc:
|
||||||
self.log('\t', desc)
|
self.log('\t', desc)
|
||||||
for li in soup.find(id='stream-panel').find('ol').findAll('li'):
|
for li in soup.find(id='stream-panel').find('ol').findAll('li'):
|
||||||
h2 = li.find('h2')
|
h2 = li.find(['h2', 'h3'])
|
||||||
a = h2.findParent('a')
|
a = h2.findParent('a')
|
||||||
url = absolutize(a['href'])
|
url = absolutize(a['href'])
|
||||||
p = h2.findNextSibling('p')
|
p = h2.findNextSibling('p')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user