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 - Python Tutorial
From the course: Build Three Real-World Python Applications
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
-
-
-
What is web scraping?2m 57s
-
Introducing the Wisdom Pet Medicine website2m 4s
-
How to explore a webpage2m 45s
-
(Locked)
Understanding HTML code1m 56s
-
(Locked)
Understanding the requests package3m 8s
-
(Locked)
How to use the get() method2m 38s
-
(Locked)
How to retrieve webpage information4m 4s
-
(Locked)
How to retrieve HTML code1m 36s
-
(Locked)
How to use BeautifulSoup2m 20s
-
(Locked)
How to use find() and find_all() methods3m 52s
-
(Locked)
How to loop find_all() methods3m 21s
-
(Locked)
How to retrieve webpage links2m 18s
-
(Locked)
How to write HTML code to a text file2m 7s
-
-
-
-