In simple words, BeautifulSoup is a Python library for pulling data out of HTML and XML files . It can be used with requests, because it needs an input (document or url) to create a soup object asit cannot fetch a web page by itself. You can use the following Python script to gather the title of web page and hyperlinks.