469,889 Members | 1,268 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,889 developers. It's quick & easy.

Re: Submitting data to HTTPS javascript

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.



Jun 27 '08 #1
0 698

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.