mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-02-24 19:33:34 +01:00
Update RealClear
This commit is contained in:
parent
e9c2e24155
commit
1f73a147de
1 changed files with 5 additions and 2 deletions
|
|
@ -114,7 +114,7 @@ def extractPrintURL(self, pageURL):
|
|||
return printFind['href']
|
||||
tag = printFind.parent
|
||||
print(tag)
|
||||
if tag['href'] is None:
|
||||
if tag.get('href', None) is None:
|
||||
if self.debugMessages is True :
|
||||
print("Not in parent, trying skip-up")
|
||||
if tag.parent['href'] is None:
|
||||
|
|
@ -170,7 +170,10 @@ def parseRSS(self, index) :
|
|||
print(description)
|
||||
print(pubDate)
|
||||
print(url)
|
||||
url = self.extractPrintURL(url)
|
||||
try:
|
||||
url = self.extractPrintURL(url)
|
||||
except Exception:
|
||||
self.log.exception('Failed to extract print URL for %s' % url)
|
||||
print(url)
|
||||
# url +=re.sub(r'\?.*', '', div['href'])
|
||||
pubdate = time.strftime('%a, %d %b')
|
||||
|
|
|
|||
Loading…
Reference in a new issue