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