From the course: Build Three Real-World Python Applications

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

How to use BeautifulSoup

How to use BeautifulSoup

- [Instructor] In the previous video, we saw how we were able to successfully pull the HTML code from the website into our Python code. You may have noticed the way Python automatically pulls in the HTML code tends to be very messy, difficult to read and nearly impossible to see the structure of the code. The BeautifulSoup package can be very useful at enhancing how we view the HTML code with the method prettify. The BeautifulSoup package has many uses when it comes to scraping information from webpages. To install the BeautifulSoup package, let's type in our %pip install bs4 and run this. You'll notice we are installing BS4 and this stands for BeautifulSoup 4. When we run this line of code, it will load the BeautifulSoup package into our code space or your local machine if you are using a different application to code. Your screen will show the requirement being already satisfied or the steps Python is taking to…

Contents