Commit c58e30c2 authored by Zachary Seguin's avatar Zachary Seguin

Add useragent

parent 9485eea3
Pipeline #158 passed with stages
in 7 minutes
......@@ -72,7 +72,7 @@ def fetch_alert_from_url(self, url):
logger.info('Requesting "{url}"'.format(url=url))
# Execute the HTTP request
xml = requests.get(url)
xml = requests.get(url, headers={'User-Agent': 'pyalertscanada'})
xml.encoding = 'UTF-8'
logger.info('Received status code {}'.format(xml.status_code))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment