[Autogenerated] beautiful soup is a tool which can help you quickly extract.
Data from web page is it's API is very friendly to new developers
and it can also handle malformed marker very well.
We briefly looked in the previous demo at Beautiful Soup.
We saw that alone.
It cannot get the job done so often.
We need to use an in combination with the request library to download the
web page and then use beautiful soup to part the HTML markup.
So, in essence,
beautiful soup is nothing more than a python package that can
understand and correctly parsed HTML nXML markup,
even if the markup is incorrect or if it has missing tags.
Beautiful soup works very well with Python two and Python three,
so it is widely compatible across the board.
So how is this achieved?
Beautiful soup is able to.
Achieve this by processing the full HTML marco from the sites and with
this information by using a solid partner approach.
It is able to identify all the tags and DOM elements within the markup.
This allows beautiful soup to have clear advantages over other HTML partners.
So let's have a look at what these advantages are beautiful.
Super has the following advantages when it comes to parsing HTML markup.
First of all,
it's quite simple and very intuitive to use theon object
model is easy for developers to implement.
Beautiful soup is able to parse the entire HTML tree of a markup.
So then it is able to.
Identify all the markup tags and document object model
references within the extract that content.
Another great feature of beautiful soup is that it is able to
overcome incorrect Markab structure and formatting.
Because of this,
beautiful soup is able to complete missing tags found on the content.
Using beautiful soup is also stronger than relying on regular
expressions to identify tags within the markup.
Finally,
in possibly the greatest feature of beautiful soup is that it supports
various and popular partners such as Al XML and HTML partners.
Now let's talk about beautiful soup objects.
Beautiful Soup has four different types of objects.
The first object type it supports is the tag object,
which indicates nXML, or HTML tag contained within the original document.
Then there is a navigable string object,
which indicates a bit of text within a tag.
The most important object is the beautiful soup object,
which represents the full parse document.
Then there is a common object, especially for comments within the markup.
As this course focuses more on how to work with scrapie than anything else,
Feel free to check out the official beautiful soup documentation if
you would like to expand your knowledge about it.