Fill form values in a web page via a Python script (not testing)

Viewed 101173

I need to fill form values on a target page then click a button via Python. I've looked at Selenium and Windmill, but these are testing frameworks - I'm not testing. I'm trying to log into a 3rd party website programatically, then download and parse a file we need to insert into our database. The problem with the testing frameworks is that they launch instances of browsers; I just want a script I can schedule to run daily to retrieve the page I want. Any way to do this?

5 Answers

For checkboxes, use 1 & 0 as true & false respectively:

br["checkboxname"] = 1 #checked = true
br["checkboxname2"] = 0 #checked = false
Related