Skip to content

Instantly share code, notes, and snippets.

@gmr
Created September 30, 2018 01:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gmr/1af89bb04c1873c9242319ef1a2b4ff6 to your computer and use it in GitHub Desktop.
Save gmr/1af89bb04c1873c9242319ef1a2b4ff6 to your computer and use it in GitHub Desktop.
import gzip
import requests
r = requests.get('http://data.dot.state.mn.us/iris_xml/incident.xml.gz')
with open('incident.xml', 'w') as handle:
handle.write(gzip.decompress(r.content).decode('utf-8'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment