sushant10 / HQ_Bot

📲 Bot to help solve HQ trivia
MIT License
173 stars 92 forks source link

Beautiful Soup Content Grab not Working #93

Open aliguy opened 6 years ago

aliguy commented 6 years ago

Currently I am able to run the bot, and the screenshot grab appears to be functioning however the point scoring does not. Whilst testing using the sample question, I have discovered that when using the get_page() fucntion with wikipedia - the program does not function correctly. Having looked through the code, and tested many things - I have managed to find out that the page variable is "Falsy" and therefore as a string returns nothing on print, hence the 0 score for each key word. So essentially there are either problems with the get_page() function or potentially something to do with beautiful soup. Does anyone know how to solve this? I assume the rest of the program functions correctly as well.

coltensmith121 commented 6 years ago

I had this problem and just started downloading different packages intell it worked and also try running cmd as admin this worked for me..

aliguy commented 6 years ago

Thank you, yeah - figured out that it was only the Wikipedia page grabs that were malfunctioning - I now have the program run a loop to find a link, until there is content in the page variable, bit less accurate though than relying only on wikipedia. Tried using sudo but no luck. Any ideas as to why py packages you downloaded on top of the requirements?

coltensmith121 commented 6 years ago

try downloading this but entering in cmd terminal git+https://github.com/abenassi/Google-Search-API/ and also do you have tesseract-ocr downloaded? pip install pytesseract

coltensmith121 commented 6 years ago

Make sure all packages are up to date to, I had a problem with selem not being up to date but worst case go through everyone and make sure they are latest download