1

I would like to be able to have the mechanize module in python find the download button on a page and click the button, and then save the file to a custom directory. Is that even possible with this module, and if so, can someone point me in the right direction?

Thanks!

  • How do you know which button is the download button? What do you do if there is no download button identified? What do you do if the program clicks on the wrong button? – spencer nelson Nov 19 '12 at 23:20
  • Are you talking about a specific page or pages in general? Also, are you certain the button does not require javascript to function? – Andrew Gorcester Nov 19 '12 at 23:24
  • Well this is what I want to test out. The download may be a form variable, or a Javascript button to initiate the download. I'm trying to understand how to get mechanize to simulate a click on the button, and whatever exceptions that come about will be logged Kharybdis. I'm also speaking of a single page, almost similar to a squeeze page with a simple Download Here button. – Richard Purcell Nov 19 '12 at 23:29

1 Answers1

0

I would recommend using PyQt4 if you're going to be handling javascript

  • possible duplicate of [mechanize python click a button](http://stackoverflow.com/questions/1806238/mechanize-python-click-a-button) –  Dec 04 '12 at 03:09