0% found this document useful (0 votes)
10 views2 pages

Python Assignment - A

The document outlines an assignment to create a Python program that scrapes data from Google Maps search results using libraries like Beautiful Soup, Playwright, and Scrapy. The program must scrape business name, address, category, reviews, website, and phone number and insert the data into a MySQL database. Requirements include using specific libraries for scraping and parsing HTML, scraping the listed data fields, creating a MySQL database with a table to store the data, and submitting the Python program with documentation.

Uploaded by

9itech.online
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)
10 views2 pages

Python Assignment - A

The document outlines an assignment to create a Python program that scrapes data from Google Maps search results using libraries like Beautiful Soup, Playwright, and Scrapy. The program must scrape business name, address, category, reviews, website, and phone number and insert the data into a MySQL database. Requirements include using specific libraries for scraping and parsing HTML, scraping the listed data fields, creating a MySQL database with a table to store the data, and submitting the Python program with documentation.

Uploaded by

9itech.online
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
You are on page 1/ 2

Web Scraping and Database Assignment

Objective: In this assignment, you will create a Python program that scrapes data
from Google Maps search results using different libraries such as Beautiful Soup,
Playwright, Scrapy, and Puppeteer. The scraped data will be inserted into a MySQL
database for storage.

Requirements:

Scraping Libraries: You need to use the following scraping libraries for different
parts of the assignment:

• Beautiful Soup for parsing HTML content.


• Playwright (or Puppeteer) for dynamic web content scraping.
• Scrapy for structured web crawling.
Data to Scrape: Your program should scrape the following information from
Google Maps search results for businesses:

• Business name
• Address
• Category
• Review average
• Review count
• Website
• Phone number
MySQL Database: You need to create a MySQL database to store the scraped
data. The database schema should include a table to store the above-mentioned
data.

Submission: Submit your Python program, along with a document explaining


how to set up the MySQL database, run the program, and any challenges you
faced during the process.

Tips:

• Before scraping, analyse the structure of Google Maps pages using


browser developer tools to identify HTML elements and classes that
contain the data you need.
• Use proper error handling to manage exceptions during scraping.
• Use different libraries for specific purposes – Beautiful Soup for parsing,
Playwright (or Puppeteer) for dynamic content, and Scrapy for crawling.
• Ensure you're scraping responsibly and adhering to Google's terms of
service.
.
Please see the image below for reference.

Good luck with the assignment!

You might also like