开发者

Throttle Mechanize gem

开发者 https://www.devze.com 2023-04-06 04:16 出处:网络
Is there any built-in way to throttle Mechanize gem? I\'m searching something like a callback on making an HTTP request.

Is there any built-in way to throttle Mechanize gem?

I'm searching something like a callback on making an HTTP request.

Later edit:开发者_StackOverflow社区 I would like to implement bandwith throttling, to avoid flooding parsed sites. EG: Only allow one request per second.


It may be that pre_connect_hooks is what you are looking for. Sadly, I am unable to find any way to add one but adding directly a lambda/Proc to the array.

They are called here and this method is called here

0

精彩评论

暂无评论...
验证码 换一张
取 消