Elliott
Elliott

Reputation: 1

Automate file download from http using python

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

Upvotes: 0

Views: 4840

Answers (2)

dalloliogm
dalloliogm

Reputation: 8940

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.

Upvotes: 0

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 798526

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

Upvotes: 3

Related Questions