mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-01-06 20:20:30 -05:00
Update New York Review of Books
This commit is contained in:
parent
0f3a1d6ff3
commit
7d9a2aee8a
@ -74,9 +74,12 @@ class NewYorkReviewOfBooks(BasicNewsRecipe):
|
||||
|
||||
# Find TOC
|
||||
articles = []
|
||||
for h4 in soup.findAll('h4'):
|
||||
for h4 in soup.findAll('h2'):
|
||||
title = self.tag_to_string(h4).strip()
|
||||
url = absurl(h4.find('a')['href'])
|
||||
a = h4.find('a')
|
||||
if a is None:
|
||||
continue
|
||||
url = absurl(a['href'])
|
||||
author = self.tag_to_string(h4.parent.parent.find('a'))
|
||||
title = title + ' (%s)' % author
|
||||
desc = ''
|
||||
|
||||
@ -64,9 +64,12 @@ class NewYorkReviewOfBooks(BasicNewsRecipe):
|
||||
|
||||
# Find TOC
|
||||
articles = []
|
||||
for h4 in soup.findAll('h4'):
|
||||
for h4 in soup.findAll('h2'):
|
||||
title = self.tag_to_string(h4).strip()
|
||||
url = absurl(h4.find('a')['href'])
|
||||
a = h4.find('a')
|
||||
if a is None:
|
||||
continue
|
||||
url = absurl(a['href'])
|
||||
author = self.tag_to_string(h4.parent.parent.find('a'))
|
||||
title = title + ' (%s)' % author
|
||||
desc = ''
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user