Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Javascript and Web-site navigation using LWP, et. al

by mckfuller (Initiate)
on Jun 11, 2005 at 00:56 UTC ( [id://465724]=perlquestion: print w/replies, xml ) Need Help??

mckfuller has asked for the wisdom of the Perl Monks concerning the following question:

Aloha,

I am trying to write an application to navigate through a web site that uses a lot of javascript. A lot of it is to determine what uri fragment to append to the current uri for navigation. There is other, more meaty, javascript that I'm not sure I can duplicate easily in my code. Is there a way to "run" the javascript as I am traversing the site?

No pressure or anything, but if I don't figure this out soon, I'm up a creek.

Aloha,
mckfuller
  • Comment on Javascript and Web-site navigation using LWP, et. al

Replies are listed 'Best First'.
Re: Javascript and Web-site navigation using LWP, et. al
by jpeg (Chaplain) on Jun 11, 2005 at 01:56 UTC
    I haven't used it myself, but JavaScript::SpiderMonkey and the javascript.pm modules both say they can eval js code by providing interfaces to two different javascript engines.

    I could have sworn I saw someone talking about a subclass of WWW::Mech that spoke javascript, but I guess I was wrong.

    --
    jpg
Re: Javascript and Web-site navigation using LWP, et. al
by dpavlin (Friar) on Jun 11, 2005 at 16:06 UTC
Re: Javascript and Web-site navigation using LWP, et. al
by thcsoft (Monk) on Jun 11, 2005 at 01:09 UTC
      I would actually recommend to not look at the above mentioned packages.. because I did, and they create javascript structures, not parse them.

      I'm sorry I can't offer any more help. You may have a legitimate requirement to parse javascript on webpages, but as far as I know this is near impossible.. I'm most curious to see if you get a better answer in this forum!

Re: Javascript and Web-site navigation using LWP, et. al
by sh1tn (Priest) on Jun 11, 2005 at 02:08 UTC
    You may want to try Form Builder which generates js on the fly.


      You and thcsoft both have the wrong idea.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://465724]
Approved by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-06-14 05:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.