diff --git a/fake_traffic.py b/fake_traffic.py index ab79d6d..c089b3b 100644 --- a/fake_traffic.py +++ b/fake_traffic.py @@ -116,6 +116,16 @@ def _thread(trend): recursive_browse(url, depth=randint(max(0, 9-i), max(5, 11-i))) def fake_traffic(country='US', language='en-US', threads=THREADS, min_wait=MIN_WAIT, max_wait=MAX_WAIT, debug=DEBUG): +""" Imitating an Internet user by mimicking popular web traffic (internet traffic generator). + + country = country code ISO 3166-1 Alpha-2 code (https://www.iso.org/obp/ui/), + language = country-language code ISO-639 and ISO-3166 (https://www.fincher.org/Utilities/CountryLanguageList.shtml), + threads = number of threads (defaults to 1), + min_wait = minimal delay between requests (defaults to 1), + max_wait = maximum delay between requests (defaults to 30), + debug = if True, then print the details of the requests (defaults to False). + """ + global THREADS, MIN_WAIT, MAX_WAIT, DEBUG THREADS = threads MIN_WAIT = min_wait