Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
#perl2exe_include "HTTP/Message.pm"; #perl2exe_include "Encode/Locale.pm"; #perl2exe_include "parent.pm"; #perl2exe_include "URI/_foreign.pm"; #perl2exe_include "URI/_generic.pm"; #perl2exe_include "URI/_query.pm"; #perl2exe_include "HTTP/Cookies.pm"; #perl2exe_include "URI.pm"; 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 = 'https://www.bing.com/search?q=ALLIANCE+BOOTS+wikipedia&qs=n +&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"=>"www.bing.com"); $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;

In reply to Re^2: Perl2exe conversion help by Sathishkumar
in thread Perl2exe conversion help by Sathishkumar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-04-25 12:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found