Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

extracting Javascript from a web page

2 views
Skip to first unread message

Alex

unread,
Nov 15, 2003, 6:32:37 AM11/15/03
to
Hi Everyone,

I have a perl script which tries to read a web page and then submit
data to a form using LWP::UserAgent. The page has some Javascript in
the header which does not show when I look at the page's source, and
which - I suspect - is crucial to filling the form out correctly (I
keep getting 500 Server Error otherwise).

I am trying to find out if there is a way to see that "hidden"
Javascript so I could amend my form submission accordingly. It seems
like there HAS to be a way since every browser can see it, and
therefore UserAgent should be seeing it too. However, I dumped and
looked through the entire $response variable (not just
$response->{'content'}) but the Javascript code appears to be hidden
there as well.

To forestall the potential flames: I DO have the permission of the
website owners to do what I am doing but their tech support is
obviously only from 9-5 and not necessarily immediately responsive so
I am trying to get as much as I can done by myself.

Thanks very much for your help!

Alex

P.S. Please feel free to cc your responses to my email.

Tad McClellan

unread,
Nov 15, 2003, 9:20:19 AM11/15/03
to
Alex <atur...@iname.com> wrote:

> I have a perl script which tries to read a web page and then submit
> data to a form using LWP::UserAgent. The page has some Javascript in
> the header which does not show when I look at the page's source, and
> which - I suspect - is crucial to filling the form out correctly (I
> keep getting 500 Server Error otherwise).


Run it through the Web Scraping Proxy to see what is really
being passed back and forth:

http://www.research.att.com/~hpk/wsp/


--
Tad McClellan SGML consulting
ta...@augustmail.com Perl programming
Fort Worth, Texas

Malcolm Dew-Jones

unread,
Nov 15, 2003, 7:58:41 PM11/15/03
to
Alex (atur...@iname.com) wrote:
: Hi Everyone,

: I have a perl script which tries to read a web page and then submit
: data to a form using LWP::UserAgent. The page has some Javascript in
: the header which does not show when I look at the page's source, and
: which - I suspect - is crucial to filling the form out correctly (I
: keep getting 500 Server Error otherwise).

: I am trying to find out if there is a way to see that "hidden"
: Javascript

How does one "hide" javascript?

Me thinks that it must be visible somewhere.

Either there is a link ( src=... ) or there are frames or multiple windows
and the javascript is visible (or linked) in that other frame or window.

BTW: someone mentioned a javascript module. It might be fun to use that
module to run the javascript to help fill in the form.

0 new messages