[2.5.1] Script to download and rename bunch of files?
Laurent Claessens
moky.math at gmail.com
Fri Apr 8 09:14:27 EDT 2011
More information about the Python-list mailing list
Fri Apr 8 09:14:27 EDT 2011
- Previous message (by thread): [2.5.1] Script to download and rename bunch of files?
- Next message (by thread): [2.5.1] Script to download and rename bunch of files?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Le 08/04/2011 14:47, Gilles Ganault a écrit : > Hello, > > Before I go ahead and learn how to write this, I was wondering if > someone knew of some source code I could use to download and rename a > bunch of files, ie. the equivalent of wget's -O switch? > > I would provide a two-column list where column 1 would contain the > full URL, and column 2 would contain the name to use to rename the > file once downloaded. > > Thank you. The following puts in the string `a` the code of the page urlBase : a = urllib.urlopen(urlBase).read() Then you have to write `a` in a file. There could be better way. Laurent
- Previous message (by thread): [2.5.1] Script to download and rename bunch of files?
- Next message (by thread): [2.5.1] Script to download and rename bunch of files?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list