{"id":22235517,"url":"https://github.com/dimplektech/cookie-clicker-automation-bot","last_synced_at":"2025-03-25T09:25:10.338Z","repository":{"id":261288228,"uuid":"883848949","full_name":"Dimplektech/Cookie-Clicker-Automation-Bot","owner":"Dimplektech","description":"Using Python and Selenium","archived":false,"fork":false,"pushed_at":"2024-11-05T17:54:16.000Z","size":6,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-30T08:43:30.266Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dimplektech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-11-05T17:19:08.000Z","updated_at":"2025-01-05T01:52:15.000Z","dependencies_parsed_at":"2024-11-05T18:49:39.222Z","dependency_job_id":null,"html_url":"https://github.com/Dimplektech/Cookie-Clicker-Automation-Bot","commit_stats":null,"previous_names":["dimplektech/cookie-clicker-automation-bot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dimplektech%2FCookie-Clicker-Automation-Bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dimplektech%2FCookie-Clicker-Automation-Bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dimplektech%2FCookie-Clicker-Automation-Bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dimplektech%2FCookie-Clicker-Automation-Bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dimplektech","download_url":"https://codeload.github.com/Dimplektech/Cookie-Clicker-Automation-Bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245433407,"owners_count":20614473,"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":[],"created_at":"2024-12-03T02:13:36.525Z","updated_at":"2025-03-25T09:25:10.318Z","avatar_url":"https://github.com/Dimplektech.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cookie Clicker Automation Bot\n\nThis project is a Python script that automates the Cookie Clicker game using Selenium. The bot continuously clicks the cookie and purchases the most expensive affordable upgrades to optimize the cookie production rate.\n\n## Features\n\n- Automatically clicks the cookie at high speed.\n- Periodically checks for available upgrades and purchases the most expensive one that can be afforded.\n- Runs for a set duration (default is 5 minutes).\n- Reports the cookies per second (CPS) rate after running.\n\n## Prerequisites\n\n- Python 3.x installed\n- Google Chrome installed\n- [ChromeDriver](https://chromedriver.chromium.org/downloads) compatible with your Chrome version\n- `selenium` Python package\n\n## Installation\n\n1. **Clone the repository or download the script**:\n    ```bash\n    git clone https://github.com/Dimplektech/Cookie-Clicker-Automation-Bot.git\n    \n    ```\n\n2. **Install the required Python packages**:\n    ```bash\n    pip install selenium\n    ```\n\n3. **Ensure `chromedriver` is in your system path** or place it in the project directory.\n\n## Usage\n\n1. Run the Python script:\n    ```bash\n    python main.py\n    ```\n\n2. The bot will:\n    - Open the Cookie Clicker game in Chrome.\n    - Start clicking the cookie.\n    - Purchase upgrades at regular intervals to maximize cookie production.\n    - Stop after 5 minutes and display the cookies per second (CPS) rate.\n\n## Code Overview\n\nThe main script is organized into functions for clarity and modularity:\n\n- **`setup_driver()`**: Initializes and returns the Selenium WebDriver.\n- **`get_item_ids(driver)`**: Retrieves IDs of all upgrade items.\n- **`get_prices(driver)`**: Extracts the prices of available upgrades.\n- **`get_cookie_count(driver)`**: Gets the current number of cookies.\n- **`get_affordable_upgrades(cookie_count, item_prices, item_ids)`**: Returns a dictionary of upgrades that can be afforded.\n- **`purchase_upgrade(driver, upgrade_id)`**: Purchases the specified upgrade.\n- **`main()`**: Controls the main automation loop and logs the CPS at the end.\n\n## Example Output\nCookies per second: 60\n\n## License\n\nThis project is open-source and available under the [MIT License](LICENSE).\n\n## Contributing\n\nContributions are welcome! If you would like to contribute, please fork the repository and submit a pull request.\n\n## Troubleshooting\n\n- **ChromeDriver Version Mismatch**: Ensure that the `chromedriver` version matches your installed Chrome version.\n- **Selenium Version**: Use the latest version of Selenium to avoid compatibility issues.\n\n\n\n*Happy Clicking!*\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimplektech%2Fcookie-clicker-automation-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimplektech%2Fcookie-clicker-automation-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimplektech%2Fcookie-clicker-automation-bot/lists"}