views:

67

answers:

2

I want to automatically save a file from a website. I don't know how to bypass the Download File prompt in python and save it directly to my c: drive.

Any help is appreciated, Elliott

+2  A: 

Modules like urllib2 and urlgrabber don't have a "Download File" prompt.

Ignacio Vazquez-Abrams
A: 

One idea is to use a module like mechanize to automate the query and the download. Here you can find some documentation.

  • Usually when you post a question here at stackoverflow, it is a good idea to post an example at how you have tried to solve the problem, and then we will help you to improve it, rather than asking people to write the solution for you,
  • when you use mechanize, configure the UserAgent properly and respect the policy of the webmasters about scraping.
dalloliogm