Automated JetPunk quiz solver built with Selenium for browser automation and DOM interaction.
- Python 3.10+
- Google Chrome
Install dependencies:
pip install selenium requests tqdm coloramaChromeDriver is managed automatically by Selenium Manager. No manual installation is required.
Configure config.json:
{
"chrome_path": "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe",
"username": "",
"password": "",
"delays": {
"char_min": 0.03,
"char_max": 0.37,
"pause_min": 0.2,
"pause_max": 1.2
},
"advanced": {
"answers_file": "answers.json",
"selenium_overhead": 0.36,
"login_api": "https://www.jetpunk.com/api/login.php",
"login_referer": "https://www.jetpunk.com/user/login?language=english"
}
}| Field | Description |
|---|---|
chrome_path |
Path to the Chrome executable |
username / password |
JetPunk credentials (required only with --login) |
delays.char_min/max |
Random delay between keystrokes (seconds) |
delays.pause_min/max |
Random delay between submitted answers (seconds) |
advanced.answers_file |
Local answer cache file |
advanced.selenium_overhead |
Estimated Selenium overhead used by --time |
python main.py [OPTIONS]| Option | Description |
|---|---|
--url URL |
Quiz URL (required for all operations except --list) |
--scrape |
Scrape and cache answers for the quiz, then exit (requires --url) |
--refresh |
Reset the cached answer pool instead of merging (requires --scrape) |
--list |
List all cached quizzes |
--login |
Log in before launching the quiz (requires --url) |
--shuffle |
Randomize answer order before typing (requires --url) |
--time SECONDS |
Target completion time in seconds (requires --url) |
Answers must be scraped and cached before playing. For standard quizzes a single
--scrape run is enough. For quizzes that show a random subset of questions each
time (e.g. flag quizzes), run --scrape several times to accumulate the full pool.
--scrape Fetch answers -> merge into cache -> exit
--scrape --refresh Reset cache, fetch fresh answers -> exit
--url Play using the cached answers (error if none found)
python main.py --url https://www.jetpunk.com/quizzes/how-many-countries-can-you-name --scrapepython main.py --url https://www.jetpunk.com/user-quizzes/176412/pays-aleatoire-par-drapeau --scrape
python main.py --url https://www.jetpunk.com/user-quizzes/176412/pays-aleatoire-par-drapeau --scrape
# repeat until the pool is complete enoughpython main.py --url https://www.jetpunk.com/quizzes/how-many-countries-can-you-namepython main.py --url https://www.jetpunk.com/quizzes/how-many-countries-can-you-name --shuffle --time 240python main.py --url https://www.jetpunk.com/quizzes/how-many-countries-can-you-name --loginpython main.py --url https://www.jetpunk.com/quizzes/how-many-countries-can-you-name --scrape --refreshpython main.py --list