List Info

Thread: Handling javascript using perl




Handling javascript using perl
user name
2006-02-24 15:49:02
Hello,

   I have to download a web page using LWP::UserAget,
wherein a cookie
is set by using a javascript. It would be better if we could
call the
javascript, instead of mimicing it to get the cookie set.

Can anybody help me in this issue

Thanks
Pravin


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Perl Programming" group.
To post to this group, send email to perl-programminggooglegroups.com
To unsubscribe from this group, send email to
perl-programming-unsubscribegooglegroups.com
For more options, visit this group at http:
//groups.google.com/group/perl-programming
-~----------~----~----~----~------~----~------~--~---

Handling javascript using perl
user name
2006-02-24 16:20:28
Pravin wrote:
> Hello,
>
>    I have to download a web page using LWP::UserAget,
wherein a cookie
> is set by using a javascript. It would be better if we
could call the
> javascript, instead of mimicing it to get the cookie
set.
>
> Can anybody help me in this issue

Write your own extension to LWP::UserAgent.  That module
basically
creates a web browser, one that does not recognize
Javascript.  There
is no magical bit you can flip that will suddenly enable
Javascript
support.  The code doesn't exist.

Write your own child class of LWP::UserAgent, or figure out
what the JS
is doing and do it yourself.

Paul Lalli


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Perl Programming" group.
To post to this group, send email to perl-programminggooglegroups.com
To unsubscribe from this group, send email to
perl-programming-unsubscribegooglegroups.com
For more options, visit this group at http:
//groups.google.com/group/perl-programming
-~----------~----~----~----~------~----~------~--~---

Handling javascript using perl
user name
2006-02-27 12:31:02
Paul,

    Thanks for your suggestion. I am novice to Perl and web
client
programming using LWP::UserAgent. Can you please give me
some more
brief idea on how to start writing the child class. 

Thanks
Pravin


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Perl Programming" group.
To post to this group, send email to perl-programminggooglegroups.com
To unsubscribe from this group, send email to
perl-programming-unsubscribegooglegroups.com
For more options, visit this group at http:
//groups.google.com/group/perl-programming
-~----------~----~----~----~------~----~------~--~---

Handling javascript using perl
user name
2006-02-27 14:47:17
Pravin wrote:
>     Thanks for your suggestion. I am novice to Perl and
web client
> programming using LWP::UserAgent. Can you please give
me some more
> brief idea on how to start writing the child class.

I don't think you understand what you're asking.  You're
asking for
advice on how to write an entire javascript interpreter. 
This is not a
trivial task.  This is not a novice task.

I absolutely guarantee you it will be far simpler to figure
out what
your particular javascript issue is, and handle that issue
directly,
rather than trying to write a complete generic solution.

For more information on the javascript-ness (and lack
thereof) of the
LWP:: family, check out the WWW::Mechanize FAQ at:
http://search.cpan.org/~petdance/WW
W-Mechanize-1.18/lib/WWW/Mechanize/FAQ.pod

For generic instructions on writing classes and inheriting:
perldoc perlmod
perldoc perlobj
perldoc Exporter

Paul Lalli


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Perl Programming" group.
To post to this group, send email to perl-programminggooglegroups.com
To unsubscribe from this group, send email to
perl-programming-unsubscribegooglegroups.com
For more options, visit this group at http:
//groups.google.com/group/perl-programming
-~----------~----~----~----~------~----~------~--~---

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )