https://github.com/honocorp/selenium-scrape
Scraping Google Maps using Selenium Web Driver
https://github.com/honocorp/selenium-scrape
google-maps python scraping selenium selenium-python
Last synced: about 1 month ago
JSON representation
Scraping Google Maps using Selenium Web Driver
- Host: GitHub
- URL: https://github.com/honocorp/selenium-scrape
- Owner: HonoCorp
- License: mit
- Created: 2021-06-19T12:55:44.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-03-16T22:54:17.000Z (over 4 years ago)
- Last Synced: 2025-06-10T13:48:37.695Z (about 1 year ago)
- Topics: google-maps, python, scraping, selenium, selenium-python
- Language: Python
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Scrape Google Maps Using Selenium
This is a simple demo on how to scrape Google Maps using Selenium WebDriver.
## Instructions
Install selenium
> pip install selenium
Download the chromedriver that is compatible with your version of chrome browser from [this url](https://chromedriver.storage.googleapis.com/index.html)
Add the chromedriver to your path. For directions on how to add chromedriver to your PATH, go to [selenium website](https://www.selenium.dev/documentation/en/webdriver/driver_requirements/#adding-executables-to-your-path)
Run `app.py` to see usage and available options
> python app.py
## Examples
1. Generate links for hotels in Mombasa
```shell
python app.py -l mombasa -o mombasa-hotels.txt hotel
```
2. Generate links for companies in Nairobi
```shell
python app.py -l nairobi -o nairobi-companies.txt company
```
3. Process output file after generating links for all companies in Nairobi
```shell
python app.py -o nairobi-companies.txt -p True company
```
4. Process given file
```shell
python process.py filename.txt
```
5. Process file, overwriting any existing output file
```shell
python process.py -f True ./data/links-20210619164636.txt
```