mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Reuters ignore missing sections
This commit is contained in:
parent
a18806490c
commit
448d50a16c
@ -73,7 +73,11 @@ class Reuters(BasicNewsRecipe):
|
|||||||
|
|
||||||
def parse_reuters_section(self, base, slug):
|
def parse_reuters_section(self, base, slug):
|
||||||
url = 'https://' + base + '/' + slug
|
url = 'https://' + base + '/' + slug
|
||||||
soup = self.index_to_soup(url)
|
try:
|
||||||
|
soup = self.index_to_soup(url)
|
||||||
|
except Exception:
|
||||||
|
self.log.error('Failed to load Reuters section:', url)
|
||||||
|
return
|
||||||
for div in soup.findAll(**classes('news-headline-list')):
|
for div in soup.findAll(**classes('news-headline-list')):
|
||||||
h3 = div.find(**classes('story-title'))
|
h3 = div.find(**classes('story-title'))
|
||||||
a = h3.parent
|
a = h3.parent
|
||||||
|
Loading…
x
Reference in New Issue
Block a user