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'} headers = {'User-Agent': 'Mozilla/5.0'}
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, requests.exceptions.ReadTimeout):
self.log.warning("Timeout fetching OpenGraph data from document %s", self.log.warning("Timeout fetching OpenGraph data from document %s",
url) url)
return ogdata return ogdata

Loading…
Cancel
Save