erikriver / opengraph

A python module to parse the Open Graph Protocol
http://ogp.me/
MIT License
226 stars 82 forks source link

Warning from BeautifulSoup #20

Open blairg23 opened 8 years ago

blairg23 commented 8 years ago
C:\Python27\lib\site-packages\bs4\__init__.py:166: UserWarning: 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.

To get rid of this warning, change this:

 BeautifulSoup([your markup])

to this:

 BeautifulSoup([your markup], "html5lib")

  markup_type=markup_type))
nalex007 commented 8 years ago

same here

nalex007 commented 8 years ago

fixed by editing /usr/local/lib/python2.7/dist-packages/opengraph/opengraph.py be changing the line

doc = BeautifulSoup(html)

to

doc = BeautifulSoup(html, "lxml")

lfyzjck commented 7 years ago

+1

grab76 commented 5 years ago

Sometime you could have this error : bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?

To fix this issue : pip install lxml

blairg23 commented 5 years ago

Holy crap, that was almost 3 years ago, how is this issue not closed yet?

advance512 commented 4 years ago

4.5 years ago. I think that this codebase is deprecated. Better use: https://github.com/topicaxis/opengraph or: https://github.com/ji3g4m6zo6/opengraph_py3-0.71 or even: https://github.com/jvanasco/metadata_parser