By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,712 Members | 763 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,712 IT Pros & Developers. It's quick & easy.

How to batch download files from web page?

P: n/a
sj
I wish to download hundreds of files from the University of Iowa sound
archive. Doing it manually would be a daunting task especially since the
files are each a few mega bytes long. Is there a standard way of using
Python for such a task? I have a fair amount of programming experiance but
very little of it relates to networks.

For those who are intrested the University of Iowa's sound archive may be
found at http://theremin.music.uiowa.edu/MIS.html

Thanks in advance
Steven Jones
Jul 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
sj <no****@forgetit.com> writes:
I wish to download hundreds of files from the University of Iowa sound
archive. Doing it manually would be a daunting task especially since the
files are each a few mega bytes long. Is there a standard way of using
Python for such a task? I have a fair amount of programming experiance but
very little of it relates to networks.


You could use the urllib module, or maybe you could use wget:

http://www.gnu.org/software/wget/wget.html
Jul 18 '05 #2

P: n/a
N.K
Consider http://harvestman.freezope.org
( Python)

sj <no****@forgetit.com> wrote in message news:<wy*******************@newssvr22.news.prodigy .com>...
I wish to download hundreds of files from the University of Iowa sound
archive. Doing it manually would be a daunting task especially since the
files are each a few mega bytes long. Is there a standard way of using
Python for such a task? I have a fair amount of programming experiance but
very little of it relates to networks.

For those who are intrested the University of Iowa's sound archive may be
found at http://theremin.music.uiowa.edu/MIS.html

Thanks in advance
Steven Jones

Jul 18 '05 #3

P: n/a
> I wish to download hundreds of files from the University of Iowa
sound archive. Doing it manually would be a daunting task
especially since the files are each a few mega bytes long. Is there
a standard way of using Python for such a task? I have a fair
amount of programming experiance but very little of it relates
to networks.

For those who are intrested the University of Iowa's sound archive
may be found at http://theremin.music.uiowa.edu/MIS.html


The easiest way to download the individual files is with
urllib.urlretrieve().

You can parse the HTML files using either htmllib.HTMLParser or the
HTMLParser module, combined with urllib.urlopen().

If you do this Google search:

urlopen htmlparser

The first several matches have some nice code samples showing how to find
the links in a web page. Add urlretrieve() to download the files and you'll
be off and running.

-Mike
Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.