{"id":20535602,"url":"https://github.com/coskundeniz/ad_clicker","last_synced_at":"2025-07-14T21:32:06.630Z","repository":{"id":71793120,"uuid":"361165752","full_name":"coskundeniz/ad_clicker","owner":"coskundeniz","description":"Google Ads clicker","archived":false,"fork":false,"pushed_at":"2024-07-22T08:50:42.000Z","size":13534,"stargazers_count":142,"open_issues_count":0,"forks_count":59,"subscribers_count":10,"default_branch":"main","last_synced_at":"2024-07-22T10:39:56.532Z","etag":null,"topics":["bing-ads","google-ads","multiprocessing","python","rotating-proxy","search","selenium","tor","undetected-chromedriver"],"latest_commit_sha":null,"homepage":"https://coskundeniz.github.io/ad_clicker/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coskundeniz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":"pythondoctor","open_collective":null,"ko_fi":"coskundeniz","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-04-24T13:14:01.000Z","updated_at":"2024-07-22T08:50:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"fec4ca57-d850-49cf-8e19-e7153eafc69d","html_url":"https://github.com/coskundeniz/ad_clicker","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coskundeniz%2Fad_clicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coskundeniz%2Fad_clicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coskundeniz%2Fad_clicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coskundeniz%2Fad_clicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coskundeniz","download_url":"https://codeload.github.com/coskundeniz/ad_clicker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225998803,"owners_count":17557473,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bing-ads","google-ads","multiprocessing","python","rotating-proxy","search","selenium","tor","undetected-chromedriver"],"created_at":"2024-11-16T00:32:58.661Z","updated_at":"2024-11-23T04:05:09.387Z","avatar_url":"https://github.com/coskundeniz.png","language":"Python","funding_links":["https://patreon.com/pythondoctor","https://ko-fi.com/coskundeniz"],"categories":[],"sub_categories":[],"readme":"# ad_clicker\n\n### Use [premium version](https://github.com/coskundeniz/google-ad-clicker-premium) for more features and better stability.\n\n---\n\nThis command-line tool clicks ads for a certain query on Google search using [undetected_chromedriver](https://github.com/ultrafunkamsterdam/undetected-chromedriver) package. Supports proxy, running multiple simultaneous browsers, ad targeting/exclusion, and running in loop.\n\n\u003e You can find the premium versions [here for Google](https://github.com/coskundeniz/google-ad-clicker-premium) and [here for Bing](https://github.com/coskundeniz/bing-ad-clicker-premium).\n\n\u003cbr\u003e\n\nOld version of the tool can be found in the `old_version` branch.\n\n* Requires Python 3.9 to 3.11\n* Requires the latest Chrome version\n\n\u003cbr\u003e\n\n[Related post on Medium](https://python.plainenglish.io/google-ads-clicker-with-python-selenium-and-tor-a6ff8078da2a)\n\n## How to setup\n\nRun the following commands in the project directory to install the required packages.\n\n* `python -m venv env`\n* `source env/bin/activate`\n* `python -m pip install -r requirements.txt`\n\n\u003cbr\u003e\n\nSee [here](https://github.com/coskundeniz/ad_clicker/wiki/Setup-for-Windows) for setup on Windows.\n\nSee [here](https://github.com/coskundeniz/ad_clicker/wiki/Creating-and-running-Docker-image) for creating the Docker image manually.\n\n## How to run\n\n* You need to see `(env)` at the beginning of your command prompt that is showing virtual environment is activated.\n\n* Before running the below commands for the first time, run `python ad_clicker.py -q test` once and end it by pressing CTRL+C after seeing the browser opened.\n\n```\nusage: python ad_clicker.py [-h] [-q QUERY] [-e EXCLUDES] [-l MAX_SCROLL_LIMIT] [--headless] [-p PROXY] [-pf PROXY_FILE] [--auth] [--incognito]\n\noptional arguments:\n  -h, --help                                                       show this help message and exit\n  -q QUERY, --query QUERY                                          Search query\n  -l MAX_SCROLL_LIMIT, --max_scroll_limit MAX_SCROLL_LIMIT         Number of maximum scrolls on the search results page\n  --headless                                                       Use headless browser (not recommended)\n  -p PROXY, --proxy PROXY                                          Use the given proxy in ip:port format\n  -pf PROXY_FILE, --proxy_file PROXY_FILE                          Select a proxy from the given file\n  --auth                                                           Use proxy with username and password. If this is passed,\n                                                                   proxy parameter should be in \"username:password@host:port\" format\n  -e EXCLUDES, --excludes EXCLUDES                                 Exclude the ads that contain given words in url or title\n  --incognito                                                      Run in incognito mode. Disables proxy usage.\n  -qf QUERY_FILE, --query_file QUERY_FILE                          Read queries to search from the given file (valid for multiprocess run)\n  -bc BROWSER_COUNT, --browser_count BROWSER_COUNT                 Maximum number of browsers to run concurrently (valid for multiprocess run)\n  -ms MULTIPROCESS_STYLE, --multiprocess_style MULTIPROCESS_STYLE  Style of the multiprocess run. (valid for multiprocess run)\n                                                                   1: different query on each browser (default)\n                                                                   2: same query on each browser\n```\n\n`python ad_clicker.py -q \u003csearch query\u003e [-e EXCLUDES] [-l MAX_SCROLL_LIMIT] [--headless] [-p PROXY] [-pf PROXY_FILE] [--auth] [--incognito]`\n\n\n### Examples\n\n```\n\"~/\" represents home folder on Linux/Mac. If you use Windows, don't use it.\nIf you put your files into project directory, you can just specify the file name,\notherwise you should give the full path.\n```\n\n* Search for \"wireless keyboard\" with the default 4 seconds visit time on clicked ad pages.\n\n    * `python ad_clicker.py -q \"wireless keyboard\"`\n\n* Search for \"wireless keyboard\" with maximum scroll set to 5.\n\n    * `python ad_clicker.py -q \"wireless keyboard\" -l 5`\n\n    * By default(0), it will scroll until the end.\n\n* Search for \"wireless keyboard\" using headless browser.\n\n    * `python ad_clicker.py -q \"wireless keyboard\" --headless`\n\n* Search for \"wireless keyboard\" using the given proxy without authentication.\n\n    * `python ad_clicker.py -q \"wireless keyboard\" -p host:port`\n\n* Search for \"wireless keyboard\" using the given proxy with authentication.\n\n    * `python ad_clicker.py -q \"wireless keyboard\" --auth -p username:password@host:port`\n\n* Search for \"wireless keyboard\" using a proxy from the given file.\n\n    * `python ad_clicker.py -q \"wireless keyboard\" -pf ~/proxies.txt`\n\n* Search for \"wireless speaker\" and click links that include the given filter words in url or title.\n\n    * `python ad_clicker.py -q \"wireless speaker@amazon#ebay  # mediamarkt\"`\n\n    * Spaces around \"@\" and \"#\" are ignored, so both \"wireless speaker@amazon#ebay\" and\n    \"wireless speaker @ amazon  # ebay\" take \"wireless speaker\" as search query and \"amazon\" and \"ebay\"\n    as filter words.\n\n    * If you will give a target domain as filter word, don't use \"http\" or \"www\" parts in it. Use like \"query@domainname.com\" or even \"query@domainname\". Keep it as short as possible to get a match.\n\n* Search for \"wireless speaker\" and click links except the ones containing the given words in url or title.\n\n    * `python ad_clicker.py -q \"wireless speaker\" -e \"amazon.com,mediamarkt.com,for 2022,Soundbar\"`\n\n    * Separate multiple exclude items with comma.\n\n* Run browser in `incognito` mode.\n\n    * `python ad_clicker.py -q \"wireless speaker\" --incognito`\n\n    * Note that the proxy extension is not enabled in *incognito* mode.\n\n* Run multiple browsers by taking queries and proxies with authentication from the given files.\n\n    * `python run_ad_clicker.py -qf ~/queries.txt --auth -pf ~/proxies.txt`\n\n    * You can see example queries in `sample_queries.txt` file.\n\n* Run multiple browsers by taking queries and proxies with authentication from the given files and pass exclude words.\n\n    * `python run_ad_clicker.py -qf ~/queries.txt --auth -pf ~/proxies.txt -e \"amazon.com,mediamarkt.com,for 2022\"`\n\n* Run multiple browsers by taking queries and proxies without authentication from the given files with 5 browsers.\n\n    * `python run_ad_clicker.py -qf ~/queries.txt -pf ~/proxies.txt -bc 5`\n\n    * If -bc(--browser_count) option is not given, the number of cpu cores is used.\n\n* Run multiple browsers by taking queries and proxies from the given files using alternative multiprocess style.\n\n    * `python run_ad_clicker.py -qf ~/queries.txt -pf ~/proxies.txt -ms 2`\n\n    * **1**: each browser instance gets a different query from file (default) (e.g. 5 browsers search the first 5 queries from the file.\n        After they are completed, second group of 5 browsers search the next 5 queries from the file and so on)\n    * **2**: multiple browser instances get the same query (e.g. 5 browsers search the first query from file. After\n        they are completed, second group of 5 browsers search the second query and so on)\n\n    * If the number of queries or proxies are less than the number of browsers to run, they are cycled.\n\n![Multiprocess Run](assets/ad_clicker_multiprocess.gif)\n\n* Run the tool in loop.\n\n    * `python run_in_loop.py -qf ~/queries.txt -pf ~/proxies.txt --auth`\n\n    * Query and proxy files are required for this command.\n    * Default wait time between runs is 60 seconds.\n\n* Run the tool in loop with given number of browser instances.\n\n    * `python run_in_loop.py -qf ~/queries.txt -pf ~/proxies.txt --auth -bc 4`\n\n* Run the tool in loop with given number of browser instances and maximum scroll set to 10.\n\n    * `python run_in_loop.py -qf ~/queries.txt -pf ~/proxies.txt --auth -bc 4 -l 10`\n\n* Run the tool in loop with given number of browser instances and 2 minutes wait between runs.\n\n    * `python run_in_loop.py -qf ~/queries.txt -pf ~/proxies.txt --auth -bc 2 -wt 120`\n\n    * Wait time parameter should be in seconds.\n\n* Run the tool in loop with given number of browser instances and pass exclude words.\n\n    * `python run_in_loop.py -qf ~/queries.txt -pf ~/proxies.txt --auth -bc 2 -e \"amazon.com,mediamarkt.com,for 2022\"`\n\n* Run the tool in loop using alternative multiprocess style.\n\n    * `python run_in_loop.py -qf ~/queries.txt -pf ~/proxies.txt --auth -ms 2`\n\n\u003cbr\u003e\n\n### How to run Docker image on Linux\n\n* If you want to use the prebuilt image from DockerHub, you can use the following command.\n    * `docker pull codenineeight/ad_clicker_docker`\n\n* Run the following command on your host machine once.\n    * `xhost local:docker`\n\n* Create a volume for the input files\n    * `docker volume create ad_clicker_files`\n\n* Add your queries and proxies files to the created volume\n    * `docker run -v ad_clicker_files:/data -v \u003cqueries.txt folder path\u003e:/mnt/host alpine cp /mnt/host/queries.txt /data/`\n    * `docker run -v ad_clicker_files:/data -v \u003cproxies.txt folder path\u003e:/mnt/host alpine cp /mnt/host/proxies.txt /data/`\n\n    * Check if the files are copied successfully\n\n        `docker run --rm -v ad_clicker_files:/data alpine ls -l /data`\n\n        ```sh\n        -rw-r--r--    1 root     root           165 Apr  1 09:25 proxies.txt\n        -rw-r--r--    1 root     root           216 Apr  1 09:25 queries.txt\n        ```\n\n* You can pass the arguments as before after the image name(in this case codenineeight/ad_clicker_docker)\n\n    * `docker run --rm -it --net=host -e DISPLAY=$DISPLAY -v ad_clicker_files:/data codenineeight/ad_clicker_docker run_ad_clicker.py -qf /data/queries.txt --auth -pf /data/proxies.txt -bc 2`\n\n    * `docker run --rm -it --net=host -e DISPLAY=$DISPLAY codenineeight/ad_clicker_docker ad_clicker.py -q \"wireless keyboard\" -p username:password@host:port --auth`\n\n---\n\n## Support \u0026 Premium Version\n\n[https://coskundeniz.github.io/ad_clicker](https://coskundeniz.github.io/ad_clicker)\n\nIf you benefit from this tool, please consider donating using the sponsor links or the following crypto addresses.\n\n* ETH: 0x461c1B3bd9c3E2d949C56670C088465Bf3457F4B\n* USDT: 0x1a4f06937100Dc704031386667D731Bea0670aaf\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoskundeniz%2Fad_clicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoskundeniz%2Fad_clicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoskundeniz%2Fad_clicker/lists"}