Update NYTimes Book Review

This commit is contained in:
Kovid Goyal 2023-08-06 10:05:57 +05:30
parent d82e5ee81d
commit 009f8f33ad
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -62,7 +62,7 @@ class NewYorkTimesBookReview(BasicNewsRecipe):
main_articles, articles = [], []
feeds = [('Features', main_articles), ('Latest', articles)]
for li in toc.findAll('li'):
h2 = li.find('h2')
h2 = li.find(['h2', 'h3'])
a = h2.find('a', href=True)
if a is not None:
title = self.tag_to_string(a)
@ -77,7 +77,7 @@ class NewYorkTimesBookReview(BasicNewsRecipe):
if desc:
self.log('\t', desc)
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')
url = absolutize(a['href'])
p = h2.findNextSibling('p')