Psycojoker / ipython-beautifulsoup

Pretty HTML/XML rendering with syntax highlighting for BeautifulSoup objects in IPython notebook and qtconsole.
68 stars 11 forks source link

Fix bs4 warning for not specifying parser. #8

Closed slaarti closed 3 years ago

slaarti commented 3 years ago

This adds a configuration option to set the default parser for BeautifulSoup to use when creating soups. It also adds arguments for any function/method that leads to a soup being created to be able to override the default parser for a particular call.

This change is fully backward compatible with the current upstream version. If none of the options/arguments added here ever get invoked, then it will by absolute default use the 'html.parser' parser, which is the batteries-included option and will suffice to shut up the UserWarning that BeautifulSoup gives about not specifying a parser.

slaarti commented 3 years ago

This should fix #6 while remaining backwards compatible. There should probably also be a version bump in setup.py; I don't know if you'd rather I add a commit for that or handle it yourself. :)

Psycojoker commented 3 years ago

Oh that's great, thx! :)

Do you feel confident enough in your changes for a release? I haven't used this code since quite some time and I don't have a lot of free time to test it well :x Worst case we make a bugfix release :)