lyyka / google-maps-businesses-scraper

Built with Python running Selenium, this app allows you to scrape places info from the google maps search results
MIT License
63 stars 25 forks source link

🚨 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

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.