Closed healur closed 6 years ago
You run hq_main.py in your IDE of choice or in the command line.
would I be able to do it on Xcode
I'm not familiar with Xcode, but I'm sure you can run Python if you wanted to.
so I just put the code into python the idle folder
You can just open hq_main with IDLE.
thanks. just one more thing how do I get the bearer token do I use Charles proxy or is there an easier way
https://github.com/gjacobs314/HQTrivia has two example bearer tokens/user IDs for you to use.
ok i opened it in idle and its a bunch of code is it cause the shows not on right now or do I need to still do something
You have to run the code. If the show's not on, it should say so.
I run it through terminal right
Yes, IDLE should work fine too.
cause my idle says multiple statements found while compiling a single statement
Please post a screenshot of the error. Alternatively, you could run python3 hq_main
in cmd/terminal with your working directory being in the HackQ-Trivia folder.
do you know what I did wrong?
Try right clicking, and under open with, click IDLE. The code should pop up in a new window instead of the shell.
I did that but how do I run it now
You can press fn+F5 or go to Run->Run Module.
this happened
Now, you need to install the dependencies for the program. In terminal, run:
pip install bs4
pip install nltk
pip install aiohttp
pip install unidecode
After you install those, you need to run these 3 lines of code in the IDLE shell:
import nltk
nltk.download("stopwords")
nltk.download("averaged_perceptron_tagger")
You then need to enter your bearer token/user ID.
terminal says pip command not found
Try using pip3 instead of pip. If that doesn't work, try running sudo easy_install pip
before running those 3 commands again.
all of them installed with pip3 except ntlk one
What does it say when you install nltk?
it worked I think I just typed it wrong the first time
Alright. Let me know if you have any more problems.
ok I just did those steps now do I rerun the script
Yes.
ok thanks
ok thanks I think it works it says show not on
Yep, that's what it's supposed to say.
ok thank you so much
how do I run it or what do I click