LoganMeitz / votefinder

GNU General Public License v3.0
2 stars 2 forks source link

BeautifulSoup parser #13

Open rjmagley opened 1 year ago

rjmagley commented 1 year ago

Saw this when looking at the server logs: Jun 19 23:47:54 localhost pipenv[1379012]: /usr/bin/votefinder-web/votefinder/main/BNRPageParser.py:140: GuessedAtParserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("html5lib"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.

Jun 19 23:47:54 localhost pipenv[1379012]: The code that caused this warning is on line 140 of the file /usr/bin/votefinder-web/votefinder/main/BNRPageParser.py. To get rid of this warning, pass the additional argument 'features="html5lib"' to the BeautifulSoup constructor.

Looks like maybe BeautifulSoup used to have some defaults that now have to be specified or something? It doesn't appear to be breaking anything, but there's no reason not to fix it.

rjmagley commented 1 year ago

tbh I have some Bigger Stuff I want to tackle this weekend but this would make a good easy fix for someone

there are four calls to BeautifulSoup() in BNRPageParser, SAForumPageDownloader, SAGameListDownloader and SAPageParser, and they're not uniformly specifying parsers - they can prrrrrobably all be using html5lib?

Bchass commented 1 year ago

Can you assign this to me please?

rjmagley commented 1 year ago

It doesn't need to be assigned - just create a new branch off of the current dev branch to make whatever changes are needed. It'll be tricky to properly test without accounts on the specific forums this project is targeting, but it's simple enough that if there are issues I can smooth them over.