Giter VIP home page Giter VIP logo

google-maps-businesses-scraper's Introduction

๐Ÿšจ ATTENTION: This project is no longer maintained as I do not have time for it. If someone is willing to make it up to date with current google maps page, you are all free to submit a PR.

Google Maps Businesses Scraper

Built with Python running Selenium, this app allows you to scrape places info from the google maps search results

CLI Arguments

  • --query
    • First part of the query you want to execute, excluding any locations, zip codes, etc. For example "Commerical property managers near"
  • --places
    • This is the second part of the query. Comma separated places,zip codes, cities, etc. For example "Washington,Miami,Chicago"
  • --pages
    • Number of pages to scrape for each search. This defaults to 1. If the defined number of pages exceed the number of pages actually in the results, the program will notice that and won't throw an error
  • --skip-duplicate-addresses
    • Flag that if included in the command, will tell the app to not scrape the results which have the addresses that is already in the file
  • --scrape-website
    • Flag that if included in the command, will tell the app to scrape website URLs too. This is optional and defaults fo false because the process is greatly slower with this flag on

Examples

The example command you can run with this app is:

python script.py --query="Commercial property managers near" --places="Washington,Miami,Chicago"

This will generate three search queries:

  1. Commercial property managers near Washington
  2. Commercial property managers near Miami
  3. Commercial property managers near Chicago

The above command will scrape all Commercial property managers that are near Washington, Miami and Chicago.

Scraping the website too

The app allows you to scrape the website urls for each company. This is disabled by default as it slows down the process. You can enable this by including a flag --scrape-website in the command like so:

python script.py --query="Commercial property managers near" --places="Washington,Miami,Chicago" --scrape-website

This will add "Website" column to the excel output file.

Requirements

As this app is made with Python and Selenium, it is required to install Python and also it requires the Chrome driver, which you can download from here. Make sure to select your browser version and put the downloaded executable in the PATH variable in your system.

google-maps-businesses-scraper's People

Contributors

lyyka avatar jadenfreude 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.