0% found this document useful (0 votes)
41 views3 pages

Web Scraping

Uploaded by

Pritam Mundhe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views3 pages

Web Scraping

Uploaded by

Pritam Mundhe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1.

Title:

Automating Web Scraping of Book Data from "Books to Scrape" Using


UiPath

2. Aim:

To extract book details such as title, price, and availability from the website
"Books to Scrape" (http://books.toscrape.com/) using UiPath and
store the data in an Excel file for further analysis.

3. Theory:

Web scraping is an automated method to extract data from websites. It


involves:

• Accessing a webpage using a browser.


• Identifying and extracting required elements (book title, price, etc.).
• Iterating through multiple pages if needed.
• Saving the extracted data in a structured format like Excel, CSV, or a
database.

UiPath provides a Data Scraping Wizard, which simplifies extracting


structured data from websites without writing complex code. It uses selectors to
identify and extract web elements.

4. Steps to Implement in UiPath:

Step 1: Create a New Project in UiPath Studio

• Open UiPath Studio.


• Create a New Process named "ScrapeBooks".
• Click Create.

Step 2: Open the Target Website

• Use the "Open Browser" activity.


• Set the URL to "http://books.toscrape.com/".
• Choose the browser (Chrome/Edge).

Step 3: Use the Data Scraping Wizard

• Click on "Data Scraping" from the Design tab.


• Select the first book title from the page.
• Click Next and select another title to confirm similar elements.
• Repeat for price and availability.
• Enable pagination to scrape multiple pages.

Step 4: Store Data in a DataTable

• The scraped data will be stored in ExtractDataTable.

Step 5: Write Data to an Excel File

• Drag the "Write Range" activity from Workbook.


• Set the file path as "BooksData.xlsx".
• Choose ExtractDataTable as the input.

Step 6: Run the Automation

• Click Run and check the Excel file for the extracted data.

5. Workflow Design:

Flowchart Representation:

1. Start
2. Open Browser (http://books.toscrape.com/)
3. Extract Data using Data Scraping Wizard
4. Store Data in ExtractDataTable
5. Write Data to Excel (BooksData.xlsx)
6. End

6. Input/Output:

Input:

• Website: http://books.toscrape.com/
• Required Data:
o Book Title
o Price
o Availability

Output:

An Excel file (BooksData.xlsx) with scraped book details:

Book Title Price Availability


The Grand Design £13.76 In stock
Book Title Price Availability
The Catcher in the Rye £10.99 In stock
A Light in the Attic £51.77 In stock

7. Conclusion:

This UiPath automation successfully scrapes book details from the "Books to
Scrape" website and saves them into an Excel file. The Data Scraping
Wizard makes it easy to extract structured data without coding. This process
can be modified to scrape additional details or to work on other e-commerce
websites.

You might also like