I'm new to python and I tried to parse some XML files in order to add some new tags and store that new XML file.
python-beautifulsoup
seams to be the right package for that. Searching around the web for tutorials, how to add an new tag to XML parsed by BeautifulSoup, i found out, that the package python-bs4
is used.
Looking at the package description, both packages have the same title:
python-bs4 - error-tolerant HTML parser for Python python-beautifulsoup - error-tolerant HTML parser for Python
So my question: what is the difference?
This is a dummy package managed by the developer of Beautiful Soup to prevent name squatting. The official name of PyPI's Beautiful Soup Python package is beautifulsoup4 . This package ensures that if you type pip install bs4 by mistake you will end up with Beautiful Soup .
Beautiful Soup is a Python library for pulling data out of HTML and XML files. It works with your favorite parser to provide idiomatic ways of navigating, searching, and modifying the parse tree. It commonly saves programmers hours or days of work.
Beautiful Soup is a Python library that is used for web scraping purposes to pull the data out of HTML and XML files. It creates a parse tree from page source code that can be used to extract data in a hierarchical and more readable manner.
bs4: Beautiful Soup(bs4) is a Python library for pulling data out of HTML and XML files. This module does not come built-in with Python.
When I go to the beautifulsoup 4.0 documentation, the first page has this information:
(The BeautifulSoup package is probably not what you want. That’s the previous major release, Beautiful Soup 3. Lots of software uses BS3, so it’s still available, but if you’re writing new code you should install beautifulsoup4.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With