mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
f5849facca
commit
ac450fb04b
@ -35,7 +35,10 @@ class NewYorkTimesBookReview(BasicNewsRecipe):
|
|||||||
continue
|
continue
|
||||||
if x['class'] in {'story', 'ledeStory'}:
|
if x['class'] in {'story', 'ledeStory'}:
|
||||||
tt = 'h3' if x['class'] == 'story' else 'h1'
|
tt = 'h3' if x['class'] == 'story' else 'h1'
|
||||||
a = x.find(tt).find('a', href=True)
|
try:
|
||||||
|
a = x.find(tt).find('a', href=True)
|
||||||
|
except AttributeError:
|
||||||
|
continue
|
||||||
title = self.tag_to_string(a)
|
title = self.tag_to_string(a)
|
||||||
url = a['href'] + '&pagewanted=all'
|
url = a['href'] + '&pagewanted=all'
|
||||||
self.log('\tFound article:', title, url)
|
self.log('\tFound article:', title, url)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user