How Do You Scrape Data from A
When you run the code for web
scraping, a request is sent to the URL that you have mentioned. As a response
to the request, the server sends the data and allows you to read the HTML or
XML page. The code then, parses the HTML or XML page, finds the data and
To extract data using web scraping
with python, you need to follow these basic steps:
- Find the URL that you want to scrape
- Inspecting the Page
- Find the data you want to extract
- Write the code
- Run the code and extract the data
- Store the data in the required format
Now let us see how to extract data
from the Flipkart website using Python.
Libraries used for Web
As we know, Python is has various
applications and there are different libraries for different purposes.
In our further demonstration, we
will be using the following libraries:
- Selenium: Selenium is a web
testing library. It is used to automate browser activities.
- BeautifulSoup: Beautiful Soup is a
Python package for parsing HTML and XML documents. It creates parse trees
that is helpful to extract the data easily.
- Pandas: Pandas is a library used
for data manipulation and analysis. It is used to extract the data and store
it in the desired format.