in reply to Re^2: WWW Mechanize and JavaScript Cookie
in thread WWW Mechanize and JavaScript Cookie
Ha ha, this is faq, see LWP::Debug
FWIW, this works for me
#!/usr/bin/perl -- use strict; use warnings; use WWW::Scripter; my $w = WWW::Scripter->new; $w->use_plugin('JavaScript'); #~ http://w3schools.com/jsref/prop_doc_cookie.asp# HTML DOM Document c +ookie Property #~ http://w3schools.com/jsref/tryit.asp?filename=tryjsref_doc_cookie #~ http://w3schools.com/jsref/tryit_view.asp?filename=tryjsref_doc_coo +kie $w->get('http://w3schools.com/jsref/tryit_view.asp?filename=tryjsref_d +oc_cookie'); print $w->cookie_jar->as_string, "\n\n"; print $w->document->body->as_text; __END__ Set-Cookie3: ASPSESSIONIDACRSCCCQ=FAKEASPSESSIONIDACRSCCCQ; path="/"; +domain=w3schools.com; path_spec; discard; version=0 Cookies associated with this document: ASPSESSIONIDACRSCCCQ=FAKEASPSESSIONIDACRSCCCQ
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: WWW Mechanize and JavaScript Cookie
by saintex (Scribe) on Mar 15, 2011 at 16:37 UTC | |
by Anonymous Monk on Mar 15, 2011 at 23:14 UTC | |
by saintex (Scribe) on Mar 16, 2011 at 10:43 UTC | |
by Anonymous Monk on Mar 16, 2011 at 16:46 UTC | |
by saintex (Scribe) on Mar 16, 2011 at 22:11 UTC | |
|