Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning from BeautifulSoup #20

Open
blairg23 opened this issue Jan 28, 2016 · 6 comments
Open

Warning from BeautifulSoup #20

blairg23 opened this issue Jan 28, 2016 · 6 comments

Comments

@blairg23
Copy link

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
Copy link

nalex007 commented Feb 5, 2016

same here

@nalex007
Copy link

nalex007 commented Feb 5, 2016

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
Copy link

lfyzjck commented Sep 6, 2016

+1

tranch added a commit to tranch/opengraph that referenced this issue Feb 7, 2017
Fix issue: Warning from BeautifulSoup.
@grab76
Copy link

grab76 commented Dec 15, 2018

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
Copy link
Author

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

@advance512
Copy link

advance512 commented Jun 1, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants