Importing Necessary Libraries
Last updated
Last updated
Libraries play an important role in Web Scraping. When you are dealing with a huge amount of data that is available on websites, Scraping with the help of python only is complicated. So Before anything let's start installing libraries one by one.
Requests allow you to send HTTP requests extremely easily. HTTP (Hypertext transfer protocol) request is used to send requests to the server and access information.
Simply go to terminal and type :
pip install requests
pip install bs4
We also need to use an HTML Parser. (HTML Parsing is the process of taking raw HTML Code and converting it into much more meaningful structure so that scraping becomes easy). One of the best HTML Parser is lxml.
is a Python library for pulling data out of HTML and XML files. Getting desired data out of HTML is not an easy task. But this library with its super useful functions just easily does that in no time !