mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 22:33:42 +02:00
Update General Knowledge Today
This commit is contained in:
parent
23f0086ab7
commit
9a8ff5539d
1 changed files with 2 additions and 2 deletions
|
|
@ -19,7 +19,7 @@ def parse_gkt_section(self, url, ignore_error=False):
|
|||
if ignore_error:
|
||||
return
|
||||
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()
|
||||
url = a.get('href')
|
||||
if title and url:
|
||||
|
|
@ -36,7 +36,7 @@ def parse_index(self):
|
|||
if 'PDF' in category or not category:
|
||||
continue
|
||||
url = a.get('href')
|
||||
self.log('Found section:', category)
|
||||
self.log('Found section:', category, 'at', url)
|
||||
articles = list(self.parse_gkt_section(url)) + \
|
||||
list(self.parse_gkt_section(url + '/page/2', ignore_error=True))
|
||||
if articles:
|
||||
|
|
|
|||
Loading…
Reference in a new issue