in reply to Re: WWW::Mechanize and javascript
in thread WWW::Mechanize and javascript

I ran the proxy.pl in regular http:// requests and saw the very nice output. I can certainly use it when I want to know what mozilla is doing & redirect it to a perl script...very nice..thanx...

However, for this task, that webpage I need to access resides on the https protocol & didn't see proxy.pl STDOUT the https requests.

should I add localhost:8017 in the mozilla proxy or ?????

thanx..

Replies are listed 'Best First'.
Re: Re: Re: WWW::Mechanize and javascript
by saintmike (Vicar) on Mar 24, 2004 at 00:33 UTC
    Unfortunately, the proxy approach (proxy.pl or HTTP::Recorder) works only on plain HTTP, not in combination with SSL.

    If it's just a single request you're trying to examine, could you possibly wing it by saving the page locally and modify the URL it sends the data to, as described here?

    --saintmike

      Actually, the latest version of HTTP::Recorder, 0.03_01, works with SSL.
Re: WWW::Mechanize and javascript
by b10m (Vicar) on Mar 24, 2004 at 12:01 UTC

    Instead of the proxy hassle, you may also want to look at Live HTTP Headers (since you're already seem to use Mozilla).

    --
    b10m

    All code is usually tested, but rarely trusted.
Re: Re: Re: WWW::Mechanize and javascript
by Agyeya (Hermit) on May 13, 2004 at 05:47 UTC
    how do i get the log file
    <update>
    I tried using the method defined.I executed
    ./proxy.pl
    On doing this, it said Server listening at port 8017
    then as per instructions, i directed the browser's proxy settings to loacalhost with port 8017
    What i did not understand is how do i obtain the log file.
    Please help
    </update>
      The page I am acquiring through a WWW::Mechanize object, is on loading calling a javascript code for onload. The code is given below. I have read around, but am not able to figure out how to emulate this javascript function.
      If somebody could please point me in the appropriate direction.
      <script language="javascript"> function window_onload() { document.getElementById("divCal").style.display="block"; document.getElementById("divMessage").style.display="none"; } </script>
      Update
      Ok understood, as i dont have to display the page, only have to scrape it, the above code is not necessary to be emulated by me.
      Thank you for your help.

        Unless you wish to display the page, you can ignore this code. It's just setting CSS attributes for the elements whose IDs are divCal and divMessage.

        If you want to understand what's going on, you should learn about DOM.