HTTP::ProxySelector::PersistentHTTP::ProxySelector::Persistent allows you to use a list of proxy servers for high volume, proxied LWP::UserAgent transactions. | |
Download |
HTTP::ProxySelector::Persistent Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Michael Trowbridge
- Publisher web site:
- http://search.cpan.org/~mtrowbri/HTTP-ProxySelector-Persistent-0.02/lib/HTTP/ProxySelector/Persistent.pm
HTTP::ProxySelector::Persistent Tags
HTTP::ProxySelector::Persistent Description
HTTP::ProxySelector::Persistent allows you to use a list of proxy servers for high volume, proxied LWP::UserAgent transactions. HTTP::ProxySelector::Persistent allows you to use a list of proxy servers for high volume, proxied LWP::UserAgent transactions.SYNOPSISThis module is a fork from HTTP::ProxySelector (written by Eyal Udassin) that is modified to:· Require less trips to look up proxy lists by caching them locally (bandwidth economy and speed).· Almost always set your useragent to a valid proxy (reliability).· Ensure that you never retry a failed proxy in a subsequent proxy selection call (minimum # of timeouts possible).· Leave the cache of proxy servers in place after execution for the next call to use (persistence). use HTTP::ProxySelector; use LWP::UserAgent; # Instantiate my $selector = HTTP::ProxySelector::Persistent->new( db_file => "/tmp/proxy_cache.bdb" ); my $ua = LWP::UserAgent->new(); # Assign a _ proxy to the UserAgent object. $selector->set_proxy($ua) or die $selector->error(); # Just in case you need to know the chosen proxy print 'Selected proxy: ',$selector->get_proxy(),"n"; # Perform a quick proxied get. Lets you skip the useragent stuff. my $html = $selector->proxied_get( url => "http://www.google.com" ) or die $selector->error(); Requirements: · Perl · BerkeleyDB · LWP::UserAgent · Date::Manip
HTTP::ProxySelector::Persistent Related Software