extracting Javascript from a web page

A

Alex

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.
 
T

Tad McClellan

Alex said:
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/
 
M

Malcolm Dew-Jones

Alex ([email protected]) 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top