LWP::UserAgent::Throttled - Throttle requests to a site
Version 0.02
Some sites with REST APIs, such as openstreetmap.org, will blacklist you if you do too many requests.
use LWP::UserAgent::Throttled; my $ua = LWP::UserAgent::Throttled->new(); $ua->load(5); print $ua->get('http://www.example.com'); sleep (2); print $ua->get('http://www.example.com'); # Will wait at least 3 seconds before the GET is sent
Creates a LWP::UserAgent::Throttled object.
See LWP::UserAgent.
Get/set the number of seconds between each request. The default is one second.
Nigel Horne, <njh at bandsman.co.uk>
<njh at bandsman.co.uk>
LWP::UserAgent
You can find documentation for this module with the perldoc command.
perldoc LWP::Throttle
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=LWP-Throttle
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/LWP-Throttle
CPAN Ratings
http://cpanratings.perl.org/d/LWP-Throttle
Search CPAN
http://search.cpan.org/dist/LWP-Throttle/
Copyright 2017 Nigel Horne.
This program is released under the following licence: GPL2
To install LWP::UserAgent::Throttled, copy and paste the appropriate command in to your terminal.
cpanm
cpanm LWP::UserAgent::Throttled
CPAN shell
perl -MCPAN -e shell install LWP::UserAgent::Throttled
For more information on module installation, please visit the detailed CPAN module installation guide.