mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Update General Knowledge Today
This commit is contained in:
parent
23f0086ab7
commit
9a8ff5539d
@ -19,7 +19,7 @@ class GKT(BasicNewsRecipe):
|
|||||||
if ignore_error:
|
if ignore_error:
|
||||||
return
|
return
|
||||||
raise
|
raise
|
||||||
for a in root.xpath('//div[@class="post-content"]/h1/a[@href]'):
|
for a in root.xpath('//div[@class="posts-listing"]/h1/a[@href]'):
|
||||||
title = self.tag_to_string(a).strip()
|
title = self.tag_to_string(a).strip()
|
||||||
url = a.get('href')
|
url = a.get('href')
|
||||||
if title and url:
|
if title and url:
|
||||||
@ -36,7 +36,7 @@ class GKT(BasicNewsRecipe):
|
|||||||
if 'PDF' in category or not category:
|
if 'PDF' in category or not category:
|
||||||
continue
|
continue
|
||||||
url = a.get('href')
|
url = a.get('href')
|
||||||
self.log('Found section:', category)
|
self.log('Found section:', category, 'at', url)
|
||||||
articles = list(self.parse_gkt_section(url)) + \
|
articles = list(self.parse_gkt_section(url)) + \
|
||||||
list(self.parse_gkt_section(url + '/page/2', ignore_error=True))
|
list(self.parse_gkt_section(url + '/page/2', ignore_error=True))
|
||||||
if articles:
|
if articles:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user