The beautifulsoup library

beautifulsoup is a library in Python, used for web scraping. It has simple methods for searching, navigating, and modifying. It is simply a toolkit used for extracting the data you needed from a web page.

Now, to use the requests and beautifulsoup functionality in your scripts you must import these two libraries using the import statement. Now, we are going to see an example of parsing a web page. Here, we are going to parse a web page, which is a top news page from the IMDb website. For that purpose, create a script and write the following content in it:

import requestsfrom bs4 import BeautifulSouppage_result = requests.get('')parse_obj = BeautifulSoup(page_result.content, ...

Get Mastering Python Scripting for System Administrators now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.