duckduckgo / zeroclickinfo-fathead

DuckDuckGo Instant Answers based on keyword data files
https://duckduckhack.com/
Other
318 stars 365 forks source link

Java: Parse.py throws warning about no parser being specified #442

Closed moollaza closed 8 years ago

moollaza commented 8 years ago

When running the parser I see a warning:

/mnt/ebs/usr/local/ddh/zeroclickinfo-fathead/lib/fathead/java/venv/lib/python2.7/site-packages/bs4/__init__.py:181: UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("html.parser"). 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.

The code that caused this warning is on line 15 of the file parse.py. To get rid of this warning, change code that looks like this:

 BeautifulSoup([your markup])

to this:

 BeautifulSoup([your markup], "html.parser")

  markup_type=markup_type))

This parse.py should be updated accordingly to prevent this warning from being displayed.


IA Page: http://duck.co/ia/view/java

moollaza commented 8 years ago

@duckduckgo/duckduckhack-contributors are there any python devs out there interested in fixing this up?

I believe it's a quick and easy fix 👍

hchienjo commented 8 years ago

@moollaza on it.