Exaphis / HackQ-Trivia

Yet another HQ Trivia bot. Automatically scrapes HQ Trivia questions without OCR and answers them.
MIT License
89 stars 54 forks source link

I think I did everything right now how do I actaully #11

Closed healur closed 6 years ago

healur commented 6 years ago

how do I run it or what do I click

Exaphis commented 6 years ago

You run hq_main.py in your IDE of choice or in the command line.

healur commented 6 years ago

would I be able to do it on Xcode

Exaphis commented 6 years ago

I'm not familiar with Xcode, but I'm sure you can run Python if you wanted to.

healur commented 6 years ago

so I just put the code into python the idle folder

Exaphis commented 6 years ago

You can just open hq_main with IDLE.

healur commented 6 years ago

thanks. just one more thing how do I get the bearer token do I use Charles proxy or is there an easier way

Exaphis commented 6 years ago

https://github.com/gjacobs314/HQTrivia has two example bearer tokens/user IDs for you to use.

healur commented 6 years ago

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

Exaphis commented 6 years ago

You have to run the code. If the show's not on, it should say so.

healur commented 6 years ago

I run it through terminal right

Exaphis commented 6 years ago

Yes, IDLE should work fine too.

healur commented 6 years ago

cause my idle says multiple statements found while compiling a single statement

Exaphis commented 6 years ago

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.

healur commented 6 years ago
screen shot 2018-03-10 at 2 53 31 pm
healur commented 6 years ago

do you know what I did wrong?

Exaphis commented 6 years ago

Try right clicking, and under open with, click IDLE. The code should pop up in a new window instead of the shell.

healur commented 6 years ago
screen shot 2018-03-10 at 4 32 05 pm
healur commented 6 years ago

I did that but how do I run it now

Exaphis commented 6 years ago

You can press fn+F5 or go to Run->Run Module.

healur commented 6 years ago
screen shot 2018-03-10 at 4 37 24 pm

this happened

Exaphis commented 6 years ago

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.

healur commented 6 years ago

terminal says pip command not found

Exaphis commented 6 years ago

Try using pip3 instead of pip. If that doesn't work, try running sudo easy_install pip before running those 3 commands again.

healur commented 6 years ago

all of them installed with pip3 except ntlk one

Exaphis commented 6 years ago

What does it say when you install nltk?

healur commented 6 years ago

it worked I think I just typed it wrong the first time

Exaphis commented 6 years ago

Alright. Let me know if you have any more problems.

healur commented 6 years ago

ok I just did those steps now do I rerun the script

Exaphis commented 6 years ago

Yes.

healur commented 6 years ago

ok thanks

healur commented 6 years ago

ok thanks I think it works it says show not on

Exaphis commented 6 years ago

Yep, that's what it's supposed to say.

healur commented 6 years ago

ok thank you so much