I would like to process a web page that contains JavaScript that is sat on a Sharepoint site.
I can access the site fine using -
my $w = WWW::Scripter->new( keep_alive => 1);
$w->use_plugin('JavaScript');
$w->credentials( "www.company.com:80", undef, 'DOMAIN\\user', 'passwor
+d' );
$w->get($url);
print $w->content(),"\n";
However it would appear that the "keep_alive" argument doesn't get passed properly as although the web page gets returned, any external JavaScript references are not fetched.
I get this message (repeated for each referenced script) :
The keep_alive option must be enabled for NTLM authentication to work.
+ NTLM authentication aborted.
couldn't get script http://www.company.com/_layouts/1033/init.js?rev=q
+X%2BG3yl4pldKy9KbPLXf9w%3D%3D: 401 Unauthorized at /usr/local/lib/per
+l5/vendor_perl/5.10.1/HTML/DOM.pm line 494
Has anyone got any idea how I can work around this?
Cheers,
LB.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.