|
|
@ -147,8 +147,13 @@ class Publications(Bureau):
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
resp = requests.get(url, timeout=20.0, headers=headers)
|
|
|
|
resp = requests.get(url, timeout=20.0, headers=headers)
|
|
|
|
except requests.ReadTimeout:
|
|
|
|
except requests.ReadTimeout:
|
|
|
|
self.log.warning("Timeout reading RSS feed %s", url)
|
|
|
|
self.log.warning("Timeout reading url %s", url)
|
|
|
|
return # TODO: do we need to spit out an error?
|
|
|
|
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
|
|
|
|
# re-render with readability
|
|
|
|
doc = readability.Document(resp.text,
|
|
|
|
doc = readability.Document(resp.text,
|
|
|
|