Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re^2: Perl2exe conversion help

by Sathishkumar (Scribe)
on Nov 18, 2015 at 07:36 UTC ( #1147977=note: print w/replies, xml ) Need Help??

in reply to Re: Perl2exe conversion help
in thread Perl2exe conversion help

#perl2exe_include "HTTP/"; #perl2exe_include "Encode/"; #perl2exe_include ""; #perl2exe_include "URI/"; #perl2exe_include "URI/"; #perl2exe_include "URI/"; #perl2exe_include "HTTP/"; #perl2exe_include ""; print "Start \n"; use strict; use URI::_foreign; use URI::_generic; use POSIX; use HTTP::Cookies; use LWP::UserAgent; use HTML::Entities; use WWW::Mechanize; use URI::Escape; use LWP::Simple; use Encode::Byte; use URI; # require URI::_foreign; print "Start 1\n"; my $ua = LWP::UserAgent->new(show_progress=>1); $ua->agent("Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/2010010 +1 Firefox/26.0"); $ua->timeout(30); $ua->cookie_jar({}); my $filename ="indiegogo"; my $cookie_file = $filename."_cookie.txt"; unlink($cookie_file); print "Start 2\n"; my $cookie = HTTP::Cookies->new(file=>$cookie_file,autosave=>1); $ua->cookie_jar($cookie); my $url = ' +&form=QBRE&pq=alliance+boots+wikipedia&sc=1-24&sp=-1&sk=&cvid=745e119 +49da642d586c3e20bead13e60'; my ($req,$res); $req = HTTP::Request->new(GET=>$url); $req->header("Host"=>""); $req->header("Accept"=>"text/html,application/xhtml+xml,application/xm +l;q=0.9,*/*;q=0.8"); $req->header("Content-Type"=>"application/x-www-form-urlencoded"); $res = $ua->request($req); $cookie->extract_cookies($res); $cookie->save; $cookie->add_cookie_header($req); print "url :: $url"; my $code = $res->code(); print $code,"\n"; if($code =~ m/50/is) { sleep 1000; goto REPEAT; } my $content = $res->content(); open sr,">narva.html"; print sr $content; close sr; exit;

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1147977]
and the monastery is silent...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2018-02-22 17:38 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (297 votes). Check out past polls.