hplgit / doconce

Lightweight markup language - document once, include anywhere
http://hplgit.github.io/doconce/doc/web/index.html
Other
311 stars 60 forks source link

Fix the python import statemant for BeautifulSoup. #56

Closed mirko-lelansky closed 8 years ago

mirko-lelansky commented 8 years ago

Fix the python import statement for BeautifulSoup for the xhtml option. This works fine but this produce the following warning message:

UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this > system ("lxml"). 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], "lxml")

To fix this one possible solution were to change the line soup = BS(filestr) with soup = BS(filestr, "lxml") or to pass the parser via an command line option.

hplgit commented 8 years ago

Fixed.