Need script to download file at known address
pfortin at pfortin.com
Wed Sep 15 02:57:06 CEST 2004
On Wed, 15 Sep 2004 00:00:21 GMT Radioactive wrote:
> I am fairly new to the latest verion of Python and using it on windows
> 95, 2000, and/or XP. What libraries, modules, functions, etc. would I
> need to set up a Python script to download a file, say
> "htttp://www.sound.com/files/bob.wav" to my own hard drive at
> I haven't found any good examples of such an operation in the
> documentation at the Python website. Any suggestions are appreciated.
See: 11. Internet Protocols and Support
In this example, Yahoo uses 00=Jan, so 08=Sep...
>>> from urllib import urlopen
>>> URL1 = "http://ichart.finance.yahoo.com/table.csv?"
>>> URL2 = "s=IBM&a=08&b=14&c=2004&d=08&e=14&f=2004&g=d&ignore=.csv"
>>> urlopen("%s%s" % (URL1,URL2)).readlines()
ichart9.finance.dcn.yahoo.com uncompressed Tue Sep 14 17:55:33 PDT 2004
More information about the Python-list