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.

Best,

Laszlo

.



Relevant Pages

  • HTTPWebRequest + Cookies problem
    ... I have a website which I'm not able to login into (although I pass all ... If I'm disabling the cookies on my IE I see that I'm not able ... order to enable cookies or something like that? ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • HTTPWebRequest + Cookies problem
    ... I have a website which I'm not able to login into (although I pass all ... If I'm disabling the cookies on my IE I see that I'm not able ... order to enable cookies or something like that? ...
    (microsoft.public.dotnet.general)
  • HTTPWebRequest + Cookies problem
    ... I have a website which I'm not able to login into (although I pass all ... If I'm disabling the cookies on my IE I see that I'm not able ... order to enable cookies or something like that? ...
    (microsoft.public.dotnet.general)
  • Re: HTTPWebRequest + Cookies problem
    ... login web request should return you a cookie which has login ticket or ... Tihs way your web request will contain required cookieand web server ... If I'm disabling the cookies on my IE I see that I'm not able ... > to login to the website. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Using Java to supply username and password to login to a web site
    ... > What I am trying to do is to retrieve and save a page from a website. ... > The website has a login page which is a form. ... HTTP request to maintaining state with cookies), ...
    (comp.lang.java.programmer)