Slightly more aggressive implementation of google_dos_protection.

This commit is contained in:
Achim D. Brucker 2017-07-30 14:41:20 +01:00
parent eace911472
commit 35c133e395
1 changed files with 2 additions and 1 deletions

View File

@ -14,6 +14,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
""" Various utility methods."""
@ -21,7 +22,7 @@ import sys
from time import sleep
from random import random
def google_dos_protection(maxrange=2.2):
def google_dos_protection(maxrange=1.8):
"""Wait a random number of seconds (between 0.5 to maxrange*0.5)
to avoid Google's bot detection"""
sleep((1+random())*(maxrange/2.0)*.5)