0

I am using Mechanize to get different elements from a web page, but there are some web sites that use a DDOS protector called "cloudflare" that delays the response of the website 5 seconds. I need to know if there is a method wich can delay the time of getting the response in Mechanize. I have already tried delaying the sending of the requests. I have tried this

agent=Mechanize.new    
agent.pre_connect_hooks << Proc.new { sleep 5 }
agent.get "www.example.com"

but it did not work

Safouen
  • 121
  • 2
  • 10

1 Answers1

0

Probably the best solution here is to contact the website owners and ask them to whitelist your IP(s), if possible.

The sites appear to have turned on DDoS protection and/or some of the actions you're doing are making it look like an attack.

damoncloudflare
  • 2,079
  • 13
  • 9