mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 13:05:04 +02:00
...
This commit is contained in:
parent
f5849facca
commit
ac450fb04b
1 changed files with 4 additions and 1 deletions
|
|
@ -35,7 +35,10 @@ def parse_index(self):
|
|||
continue
|
||||
if x['class'] in {'story', 'ledeStory'}:
|
||||
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)
|
||||
url = a['href'] + '&pagewanted=all'
|
||||
self.log('\tFound article:', title, url)
|
||||
|
|
|
|||
Loading…
Reference in a new issue