Git Product home page Git Product logo

zohaibbashir / google-maps-scrapper Goto Github PK

View Code? Open in Web Editor NEW
22.0 2.0 9.0 24 KB

This code is used to perform web scraping and data extraction from Google Maps. It is particularly designed for obtaining information about businesses, including their name, address, website, phone number, reviews, and more.

Home Page: https://google.com/maps

License: MIT License

Python 100.00%
chromium data data-scraping google google-maps googlemaps maps python python3 webscraping

google-maps-scrapper's Introduction

Google-Maps-Scrapper

This Python script utilizes the Playwright library to perform web scraping and data extraction from Google Maps. It is particularly designed for obtaining information about businesses, including their name, address, website, phone number, reviews, and more.

Table of Contents

Prerequisite

  • This code requires a python version below 3.10
  • Any version of python beyond 3.9 may cause issues and may not work properly

Key Features

  • Data Scraping: The script scrapes data from Google Maps listings, extracting valuable information about businesses, such as their name, address, website, and contact details.

  • Review Analysis: It extracts review counts and average ratings, providing insights into businesses' online reputation.

  • Business Type Detection: The script identifies whether a business offers in-store shopping, in-store pickup, or delivery services.

  • Operating Hours: It extracts information about the business's operating hours.

  • Introduction Extraction: The script also scrapes introductory information about the businesses when available.

  • Data Cleansing: It cleanses and organizes the scraped data, removing redundant or unnecessary columns.

  • CSV Export: The cleaned data is exported to a CSV file for further analysis or integration with other tools.

Installation

  1. Clone this repository:

    git clone https://github.com/zohaibbashir/google-maps-scraping.git
  2. Navigate to the project directory:

    cd google-maps-scraping
  3. Install the required Python packages:

    pip install -r requirements.txt
    

How to Use:

To use this script, follow these steps:

  1. Run the script with Python:

     python main.py -s "search term" -t total

    Write the name of the place/business in "search term" and a number in place of "total" to get the number of listings. If listings are less than the number provided it is because there are fewer listings than the number provided such as

      python main.py -s "Turkish Restaurants in Toronto Canada" -t 20
  2. The script will launch a browser, perform the search, and start scraping information. It will display the progress and save the results to a CSV file called result.csv.

google-maps-scrapper's People

Contributors

lorennmarque avatar zohaibbashir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.