1
0
Fork 0
mirror of https://github.com/evilhero/mylar synced 2024-12-27 01:57:01 +00:00

Add random delay to avoid DDOS protection

Add random delay to avoid DDOS protection (per issue 1571)
This commit is contained in:
barbequesauce 2017-03-15 13:19:19 -04:00 committed by evilhero
parent e10b2b7b9b
commit 69cc847715

View file

@ -10,6 +10,7 @@ import ftpsshup
import datetime
import gzip
import time
import random
from StringIO import StringIO
import mylar
@ -145,6 +146,9 @@ def torrents(pickfeed=None, seriesname=None, issue=None, feedinfo=None):
if all([pickfeed != '4', pickfeed != '3', pickfeed != '5', pickfeed != '999']):
payload = None
            ddos_protection = round(random.uniform(0,15),2)
            time.sleep(ddos_protection)
try:
cf_cookievalue = None
scraper = cfscrape.create_scraper()