CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
avoiding "too many request" error

 



rg83rg
New User

Jan 11, 2017, 10:59 PM

Post #1 of 3 (1284 views)
avoiding "too many request" error Can't Post

Hi all, I am a complete novice coding perl. I am playing with a script that quesries blockexplorer for transaction and balance but always get "too many requests".

Is there a way to use some sort of rotating proxy, back connect proxy or WWW::UserAgent::Random in order to stop this error?

I have setup tiny proxy and connect through that,

Is this completely wrong? I have googled for days and asked on freenode, but they are all rude and not willing to help at all.

Any help appreciated.


Code
$mech->proxy('http','http://127.0.0.1:8080'); 
my $user_agent = rand_ua("");
$mech->get("http://blockexplorer.com/q/getreceivedbyaddress/".$btcaddress); # Check transactions on my address list
my $getreceived = $mech->content;

my $user_agent = rand_ua("");
$mech->get("http://blockexplorer.com/q/addressbalance/".$btcaddress); # Check balance on my addresses
my $addressbalance = $mech->content;



BillKSmith
Veteran

Jan 12, 2017, 1:03 PM

Post #2 of 3 (1268 views)
Re: [rg83rg] avoiding "too many request" error [In reply to] Can't Post

Welcom rg83rg. Thanks for pointing out that you have already posted elsewhere. This can save us wasted effort. Please do not consider me rude for pointing out that no one can solve your problem with the information you have provided. The "secret" to getting your question answered on this (or any of the similar forums) is to form your question correctly.

Post a small complete perl program (be sure to use strict and warnings) which we can use to duplicate your problem. Post the full text of any error messages and the incorrect output. Post the output that your expect. It may be useful if you provide links to the documentation that led you to that expectation.

There is nothing wrong with asking your question in the jargon of your application, but be aware that many perl experts that could answer your question will not respond because they do not understand. (I have no idea what a 'UserAgent' is.) In this case, jargon may be necessary. Perhaps some overview (or a link to it) could help more of us understand the problem.

I certainly hope that you make the effort to try again. We really do want to help.
Good Luck,
Bill


rg83rg
New User

Jan 13, 2017, 6:09 PM

Post #3 of 3 (1256 views)
Re: [BillKSmith] avoiding "too many request" error [In reply to] Can't Post

Thank you very much, extremely helpful. I will structure my question in a better was so I can get the help I need. Thanks again.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives