This is a program that attempts to find the answers for TikTok Trivia questions using Google and OpenAI's ChatGPT. It also supports sending results to a Discord webhook.
As of 02/24/23 it has answered all non-video questions correctly (6/6 games).
In order to setup TikTok Trivia Helper you need the following:
- Python3 (Tested with Python 3.9.6)
- Tesseract
- (Optional) OpenAI API Token
- A way to display TikTok on your computer such as QuickTime Player, Bluestacks
Note: if you do not have an OpenAPI Token the helper will still work with Google without any changes.
Once you have the items listed above, follow these instructions below.
- Clone the repo:
$ git clone https://github.com/peterwzhang/TikTok-Trivia-Helper.git
- Enter the newly created directory
$ cd TikTok-Trivia-Helper
- Create a venv:
$ python -m venv ./venv
- (Optional) Open
./venv/bin/activate
and addexport OPENAI_API_KEY=PASTE YOUR API KEY HERE
to the end of the file - (Optional) in the same file as step 4 add
export DISC_WEBHK_URL=PASTE YOUR DISCORD WEBHOOK URL HERE
- Activate venv:
$ source ./venv/bin/activate
- Install requirements:
$ pip install -r requirements.txt
- Take a screenshot of your entire primary screen while a trivia question is being shown with the green timer progress bar. You will need this to change some values in
ttthelper.py
.- For
TIMER_POSITION
pick any coordinate (x, y) near the center of the timer. - For
TIMER_COLOR
get the (R, G, B, 255) values at the point forTIMER_POSITION
- For
QUESTION_REGION
get the coordinate (x,y) of the top-left, width, height of the question and answer box. Then use this format (x, y, width, height)
- For
- Run TikTok Trivia Helper:
$ python -m src.ttthelper
- To stop the program, press
Ctrl + C
in the terminal
- To stop the program, press
- Clone the repo:
$ git clone https://github.com/peterwzhang/TikTok-Trivia-Helper.git
- Enter the newly created directory
$ cd TikTok-Trivia-Helper
- Create a venv:
$ python -m venv ./venv
- (Optional) Open
./venv/Scripts/Activate.ps1
and add$env:OPENAI_API_KEY = 'PASTE YOUR API KEY HERE'
to the end of the file - (Optional) in the same file as step 4 add
$env:DISC_WEBHK_URL='PASTE YOUR DISCORD WEBHOOK URL HERE'
- Activate venv:
$ ./venv/Scripts/Activate.ps1
- Install requirements:
$ pip install -r requirements.txt
- Take a screenshot of your entire primary screen while a trivia question is being shown with the green timer progress bar. You will need this to change some values in
ttthelper.py
.- For
TIMER_POSITION
pick any coordinate (x, y) near the center of the timer. - For
TIMER_COLOR
get the (R, G, B, 255) values at the point forTIMER_POSITION
- For
QUESTION_REGION
get the coordinate (x,y) of the top-left, width, height of the question and answer box. Then use this format (x, y, width, height)
- For
- Run TikTok Trivia Helper:
$ python -m src.ttthelper
- To stop the program, press
Ctrl + C
in the terminal
- To stop the program, press
If you would like to contribute, please create/find an issue then assign yourself and link a pull request to the issue.
If you have any suggestions you can create an issue also.