Skip to main content

Imitating an Internet user by mimicking popular web traffic

Project description

Python >= 3.6 Downloads

fake_traffic

Imitating an Internet user by mimicking popular web traffic (internet traffic generator).

How it works:

1. you specify the country and language,
while True:
  2. from google trends script gets a list of popular keywords that in real time are searched 
     by people on google search in the specified country in the specified language,
  threads:
    3. select a random trend, take from there the keywords and urls of related articles,
    4. the selected keywords are searched on google and duckduckgo, the found urls are added 
       to the existing ones,
    5. the script sequentially sends requests to a list of urls,
    6. in each open url, recursive queries to random links are performed to a random depth (1-5).

Install

pip install -U fake_traffic

Dependencies

lxml
requests
google_trends
duckduckgo_search
google_searching

Simple usage

from fake_traffic import fake_traffic

fake_traffic(country='US', language='en-US")

Advanced usage

from fake_traffic import fake_traffic

fake_traffic(country='US', language='en-US', threads=2, min_wait=1, max_wait=5, debug=True)
    """
    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).
    """

Example

Mimic traffic of a user located in Turkey.

Find Turkey country code (ISO 3166-1 Alpha-2 code):

  • country = "TR"

Find Turkey country-language code (ISO-639 and ISO-3166):

  • english "en-TR",
  • kurdish "ku-TR",
  • turkish "tr-TR".

Starting work in two threads:

  • threads=2
from fake_traffic import fake_traffic

fake_traffic(country="TR", language="ku-TR", threads=2)

P.S. you can select language from other country. For example, such combinations are also correct:

fake_traffic(country="TR", language="ar-TR")
fake_traffic(country="US", language="he-IL")
fake_traffic(country="DE", language="hi-IN")

Other examples

Country Language Function
France French fake_traffic(country="FR", language="fr-FR")
Germany German fake_traffic(country="DE", language="de-DE")
India English fake_traffic(country="IN", language="en-IN")
India Hindi fake_traffic(country="IN", language="hi-IN")
Russia English fake_traffic(country="RU", language="en-RU")
Russia Russian fake_traffic(country="RU", language="ru-RU")
United Arab Emirates Arabic fake_traffic(country="AE", language="ar-AE")
United Kingdom English fake_traffic(country="GB", language="en-GB")
United States English fake_traffic(country="US", language="en-US")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fake_traffic-0.9.1.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

fake_traffic-0.9.1-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file fake_traffic-0.9.1.tar.gz.

File metadata

  • Download URL: fake_traffic-0.9.1.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for fake_traffic-0.9.1.tar.gz
Algorithm Hash digest
SHA256 4af86610ceaacf3131e44b1a3d80d7273f1917781cbc7005f7c4addb93ed7c18
MD5 2b589b2f07af5141b7d3229ec8ea4b20
BLAKE2b-256 e1f645f67b198ebaf7bb5eb5f401d2d93544709d32c79cc033dfc1b01daca3f9

See more details on using hashes here.

File details

Details for the file fake_traffic-0.9.1-py3-none-any.whl.

File metadata

  • Download URL: fake_traffic-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for fake_traffic-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4a8ef76c3879eb6266f1738fa04553b0008d7dd03baccbb0c43e91ac48a92028
MD5 bd9522d6c3c2e31be46d2969072e0b76
BLAKE2b-256 593738d30875e4f7e1d076d24b8d43eb92ec71063139b9c6432914ba12f31c45

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page