Beautiful Soup is a python package for parsing HTML. Beautiful Soup was started by Leonard Richardson.
Website reference: https://www.crummy.com/software/BeautifulSoup/

Thank you for reading this post, don't forget to subscribe!

Steps:

  • You can install Beautiful Soup 4 with pip install beautifulsoup4.

 

Simple Example for BS4:
from bs4 import BeautifulSoup
from urllib.request import urlopen
with urlopen(‘http://www.khojle.in/’) as response:
soup = BeautifulSoup(response, ‘html.parser’)
for anchor in soup.find_all(‘a’):
print(anchor.get(‘href’, ‘/’))

Take an example of one website :

http://www.khojle.in/

 


 

Right-click on this website and click on Inspect

 

 

For more details, Please find the code details:
https://github.com/saiswarup/Webscraping-Beautifulsoup_Python