Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #103225

Re: downloading a CSV

From Joel Goldstick <joel.goldstick@gmail.com>
Newsgroups comp.lang.python
Subject Re: downloading a CSV
Date 2016-02-19 16:03 -0500
Message-ID <mailman.62.1455915805.2289.python-list@python.org> (permalink)
References <1efa02db-a26a-44bd-a0ea-db81e612ccd6@googlegroups.com> <7abe9082-2720-439e-b592-432cf842874b@googlegroups.com>

Show all headers | View raw


On Fri, Feb 19, 2016 at 3:05 PM, noydb <jenn.duerr@gmail.com> wrote:

> Thanks!  That was pretty easy.
>
> import urllib.request
> url = '
> http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.csv'
> urllib.request.urlretrieve(url, csv_file)
> csv_file = r"C:\Temp\earthquakeAll_last30days.csv"
> urllib.request.urlretrieve(url, csv_file)
>
> I do want to use python -- there's much more I need to do with the file
> after downloading.
> --
> https://mail.python.org/mailman/listinfo/python-list
>

You might look at the Requests library.  Its third party, but easier to
understand and use than urllib

-- 
Joel Goldstick
http://joelgoldstick.com/ <http://joelgoldstick.com/stats/birthdays>
http://cc-baseballstats.info/

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

downloading a CSV noydb <jenn.duerr@gmail.com> - 2016-02-19 10:46 -0800
  Re: downloading a CSV MRAB <python@mrabarnett.plus.com> - 2016-02-19 19:24 +0000
  Re: downloading a CSV Grant Edwards <invalid@invalid.invalid> - 2016-02-19 19:43 +0000
  Re: downloading a CSV noydb <jenn.duerr@gmail.com> - 2016-02-19 12:05 -0800
    Re: downloading a CSV Joel Goldstick <joel.goldstick@gmail.com> - 2016-02-19 16:03 -0500
  Re: downloading a CSV Tim Chase <python.list@tim.thechases.com> - 2016-02-19 18:47 -0600

csiph-web