Cheats for the game StripCode by benawad utilizing the selenium library.
Project description
stripcodecheats
Cheats for the game StripCode by benawad utilizing the selenium library.
Installation
All steps are required.
-
Selenium - Download a chromedriver and put it in the directory for this repository.
-
PyPi - Run
pip install stripcodecheats
to install the module for this and its dependencies.
Setup
import os
from dotenv import load_dotenv
import stripcodecheats
load_dotenv()
GITHUB_USERNAME = os.environ["GITHUB_USERNAME"]
GITHUB_PASSWORD = os.environ["GITHUB_PASSWORD"]
# optional
GITHUB_TOKEN = os.environ["GITHUB_TOKEN"]
stripcodecheats.start(GITHUB_USERNAME, GITHUB_PASSWORD, github_token=GITHUB_TOKEN, executable_path="drivers/chromedriver.exe", iteration_count=10)
Your github username and password are necessary because StripCode will ask for your github account details when connecting for the first time. If you do not provide a separate token, this will also be used to request information from the GitHub API.
How It Works
Selenium is used for automatically handling the interactions with the page. It scrapes the buttons from the page and gets the repository ids from them. These are then passed to a function that queries the GitHub API for their trees. The trees are iterated over to check if a filename matches, and the answer with the match is clicked by selenium. All of the filenames with an extension matching one of the valid languages for each repository are cached to limit the amount of requests made to the GitHub API. These are then dumped into a file by pickle when the program finishes and loaded back in when the program is run.
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
Built Distribution
File details
Details for the file stripcodecheats-1.4.tar.gz
.
File metadata
- Download URL: stripcodecheats-1.4.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1932c77c40e670b5ce3b42725c835b1599a65a94ee5a6ffd83f0e40b9de5d40e |
|
MD5 | 997af0d21c408bfe687b04896f085650 |
|
BLAKE2b-256 | caba8c9806ffe35625aca6e2a0aefbfcc480b63044cb3de3c160ab710b8b76d0 |
File details
Details for the file stripcodecheats-1.4-py3-none-any.whl
.
File metadata
- Download URL: stripcodecheats-1.4-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5be5ccb9705a4890ad35955185fec957fb4e58aa013b9377bcc2e2a6a7226035 |
|
MD5 | ada19f6dae55e3d66a98e05d1eb8ccb0 |
|
BLAKE2b-256 | eb46f4a86042d285666cd5889fc51f9f08f4fc7d78e684e8fbe7976a3637a16c |