mirror of
https://github.com/evilhero/mylar
synced 2024-12-26 09:36:53 +00:00
Add random delay to avoid DDOS protection
Add random delay to avoid DDOS protection (per issue 1571)
This commit is contained in:
parent
e10b2b7b9b
commit
69cc847715
1 changed files with 4 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue