mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update RealClear
This commit is contained in:
parent
e9c2e24155
commit
1f73a147de
@ -114,7 +114,7 @@ class RealClear(BasicNewsRecipe):
|
|||||||
return printFind['href']
|
return printFind['href']
|
||||||
tag = printFind.parent
|
tag = printFind.parent
|
||||||
print(tag)
|
print(tag)
|
||||||
if tag['href'] is None:
|
if tag.get('href', None) is None:
|
||||||
if self.debugMessages is True :
|
if self.debugMessages is True :
|
||||||
print("Not in parent, trying skip-up")
|
print("Not in parent, trying skip-up")
|
||||||
if tag.parent['href'] is None:
|
if tag.parent['href'] is None:
|
||||||
@ -170,7 +170,10 @@ class RealClear(BasicNewsRecipe):
|
|||||||
print(description)
|
print(description)
|
||||||
print(pubDate)
|
print(pubDate)
|
||||||
print(url)
|
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)
|
print(url)
|
||||||
# url +=re.sub(r'\?.*', '', div['href'])
|
# url +=re.sub(r'\?.*', '', div['href'])
|
||||||
pubdate = time.strftime('%a, %d %b')
|
pubdate = time.strftime('%a, %d %b')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user