Does BeautifulSoup work with Python 3?
If not, how soon will there be a port? Will there be a port at all?
Google doesn't turn up anything to me (Maybe it's 'coz I'm looking for the wrong thing?)
First, we need to import all the libraries that we are going to use. Next, declare a variable for the url of the page. Then, make use of the Python urllib2 to get the HTML page of the url declared. Finally, parse the page into BeautifulSoup format so we can use BeautifulSoup to work on it.
As BeautifulSoup is not a standard python library, we need to install it first. We are going to install the BeautifulSoup 4 library (also known as BS4), which is the latest one.
The latest Version of Beautifulsoup is v4. 9.3 as of now.
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. BeautifulSoup 4 Guide.
About two months after I asked this question, a port has been released:
http://groups.google.com/group/beautifulsoup/browse_thread/thread/f24882cc17a0625e
It'll bet BS working, but that's about it. Not yet tried it though.
Beautiful Soup 4.x officially supports Python 3.
pip 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