|
|
|
@ -147,8 +147,13 @@ class Publications(Bureau):
|
|
|
|
|
try:
|
|
|
|
|
resp = requests.get(url, timeout=20.0, headers=headers)
|
|
|
|
|
except requests.ReadTimeout:
|
|
|
|
|
self.log.warning("Timeout reading RSS feed %s", url)
|
|
|
|
|
return # TODO: do we need to spit out an error?
|
|
|
|
|
self.log.warning("Timeout reading url %s", url)
|
|
|
|
|
self.print_small("Error: timed out reading " + url)
|
|
|
|
|
return
|
|
|
|
|
except requests.ConnectionError as e:
|
|
|
|
|
self.log.warning("Error reading url %s", url)
|
|
|
|
|
self.print_small("Error: connect error on " + url)
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
# re-render with readability
|
|
|
|
|
doc = readability.Document(resp.text,
|
|
|
|
|