This project automates the Cookie Clicker game using Selenium in Python. The script automatically clicks the big cookie and purchases products when enough cookies are collected.
- Automatically clicks the cookie continuously.
- Purchases available products when enough cookies are accumulated.
- Uses multi-threading to perform cookie clicking and product buying simultaneously.
- Python 3.x
- Google Chrome
- ChromeDriver: Make sure the version of ChromeDriver matches your installed version of Chrome. Download ChromeDriver here.
- Selenium: Install via pip.
-
Clone this repository or download the files.
-
Install the required Python libraries:
pip install selenium
-
Download the appropriate version of ChromeDriver for your system and place it in the project directory or somewhere in your PATH. Update the
executable_pathin the code with your ChromeDriver path.
-
Update ChromeDriver Path: Ensure that the
executable_pathis correct in the script:service = Service(executable_path="/path/to/chromedriver")
-
Run the script:
python main.py
- Click Cookie Function: Continuously clicks the big cookie and prints the current number of cookies in the console.
- Buy Products Function: Periodically checks if there are enough cookies to buy a product and buys the most affordable product.
- Threading: Clicks the cookie and buys products simultaneously using two separate threads.