How to add random delays between the queries sent to Google to avoid getting blocked in python
First, Google probably are blocking you because they don't like it when you take too many of their resources. The best way to fix this is to slow it down, not delay randomly. Stick a 1 second wait after every request and you'll probably stop having problems.
That said:
from random import randintfrom time import sleepsleep(randint(10,100))
will sleep a random number of seconds (between 10 and 100).