Skip to content

Instantly share code, notes, and snippets.

@gmr
Created September 30, 2018 01:44
Show Gist options
  • Select an option

  • Save gmr/1af89bb04c1873c9242319ef1a2b4ff6 to your computer and use it in GitHub Desktop.

Select an option

Save gmr/1af89bb04c1873c9242319ef1a2b4ff6 to your computer and use it in GitHub Desktop.

Revisions

  1. gmr created this gist Sep 30, 2018.
    6 changes: 6 additions & 0 deletions download.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    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'))