Update RealClear

This commit is contained in:
Kovid Goyal 2014-11-27 13:18:10 +05:30
parent e9c2e24155
commit 1f73a147de

View File

@ -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')