By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,771 Members | 1,862 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,771 IT Pros & Developers. It's quick & easy.

Re: Submitting data to HTTPS javascript

P: n/a
John Chandler wrote:
I am trying to write a script to test certain functionality of a
website that requires users to login. The login page is simple, a few
pictures and two text bars (one for username and one for password). I
tried logging in with webbrowser, but that did not work because the
page uses javascript. I also tried using win32com though I have no
idea what I am doing. Any ideas?
- Use firefox :-)
- Install "LiveHTTPHeaders" http://livehttpheaders.mozdev.org/
- Open the plugin in one window and the website in another
- Enable "capture" in livehttpheaders (default)
- Login to the website
- Disable "capture" in livehttpheaders (default)
- Check the GET and POST requests in the capture log
- Try to send the same GET and POST requests from Python.
- Don't forget that most sites will also need cookies - you have to
extract and send back cookies as needed

You do not need any GUI component for this job.

Other good things to have:

- Good knowledge of the "re" standard module, and regular expression syntax
- BeautifulSoup (especially ICanBelieveItIsBeautifulSoup...)

You might also check the "mechanoid" project. (I have never used it but
it is said to be an automatized, controllable web browser???)

If anyone is interested, I can put up a python recipe that shows how to
emulate a browser easily.

Best,

Laszlo

Jun 27 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.