Add random delay to fake download
This commit is contained in:
parent
5f8aad7355
commit
ce46f006d5
|
@ -9,6 +9,7 @@ def fake_download(ip, dest):
|
|||
import requests, random
|
||||
num = ip.split('.')[3]
|
||||
r = requests.get('https://picsum.photos/400/300?random=' + num)
|
||||
time.sleep(random.uniform(2, 10))
|
||||
with open(dest / (num + '_420.jpg'), 'wb') as f:
|
||||
f.write(r.content)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user