give up on slow loading news pages

workspace
Brendan Howell 7 years ago
parent a1553b965a
commit 630cf5f03c

@ -177,7 +177,7 @@ class Publications(Bureau):
headers = {'User-Agent': 'Mozilla/5.0'}
try:
resp = requests.get(url, timeout=20.0, headers=headers)
except requests.ReadTimeout:
except (requests.ReadTimeout, requests.exceptions.ReadTimeout):
self.log.warning("Timeout fetching OpenGraph data from document %s",
url)
return ogdata

Loading…
Cancel
Save