I need to open a webbrowser using python watch the email and password populate in the form, programmatically submit the form and keep the cookies while navigating through the web site. Any help would be greatly appreciated.

Recommended Answers

All 6 Replies

Try mechanize and see if it will work for you. An example.

I tested the Mechanize sample code and it prints the html out in the python shell but I need to open the browser and view the web page. What am I doing wrong with this?

urllib module.... read about that

may help
;)

go to this link.
http://beaker.groovie.org/index.html

As python was not 100% made for web development like php etc...
for sessions and cookies.... Python is more towards sofware development

Download the module and easy-install it. You can just use it. very handy

Try urllib, urllib2. I've done it. All you need is to POST the data via urllib or urllib2 (can't remember which), and use cookiejar to store the cookie.

It appears that the OP wants to open a web browser, i.e. subprocess.call("firefox"), and then submit some data after some period of time from a running program, which is beyond my knowledge. AFAIK you either do everything in the program or everything in the browser, especially if the page is changing.

commented: good point +13
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.