Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ankushrathour/googlemapsscraper
GoogleMapsScraper: A Python-based tool to scrape nearby places and reviews from Google Maps using Selenium and BeautifulSoup. Gather location data, ratings, and user reviews with ease.
https://github.com/ankushrathour/googlemapsscraper
beautifulsoup4 google-map-review-extractor google-maps-scraper python selenium webscra
Last synced: about 1 month ago
JSON representation
GoogleMapsScraper: A Python-based tool to scrape nearby places and reviews from Google Maps using Selenium and BeautifulSoup. Gather location data, ratings, and user reviews with ease.
- Host: GitHub
- URL: https://github.com/ankushrathour/googlemapsscraper
- Owner: AnkushRathour
- License: mit
- Created: 2024-08-10T09:04:52.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-08-10T09:19:32.000Z (3 months ago)
- Last Synced: 2024-10-11T18:22:15.667Z (about 1 month ago)
- Topics: beautifulsoup4, google-map-review-extractor, google-maps-scraper, python, selenium, webscra
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GoogleMapsScraper
**GoogleMapsScraper** is a Python-based tool designed to scrape location details and user reviews from Google Maps using **Selenium** and **BeautifulSoup**. This script allows you to gather data on nearby places, including their names, ratings, addresses, phone numbers, and reviews.
## Key Features
- **Place Data Scraping:** Extract names, ratings, addresses, and phone numbers of places from Google Maps based on a specific category and subcategory.
- **Review Scraping:** Collect user reviews, including author names, review dates, and review text.
- **Headless Browser:** Uses Selenium's headless mode for fast and efficient scraping.
- **BeautifulSoup Integration:** Parses and extracts HTML content efficiently using BeautifulSoup.## Getting Started
### Installation
Follow these steps to set up the **GoogleMapsScraper** tool:
1. **Clone the repository:**
```bash
git clone https://github.com/your-username/GoogleMapsScraper.git
cd GoogleMapsScraper
2. **Install dependencies:**Make sure you have Python 3.7+ installed, then install the required packages:
```bash
pip install selenium beautifulsoup43. **Download WebDriver:**
Download the appropriate Chrome WebDriver for your version of Chrome from ChromeDriver download.
Ensure the WebDriver executable is in your system's PATH, or specify the path in the script.## Usage
Script Configuration
- Latitude & Longitude: Set the latitude and longitude variables to define the center of your search area.
- Radius: Adjust the radius_km variable to set the search radius in kilometers.
- Category & Subcategory: Define the category and subcategory to specify the types of places you want to scrape.## Example Usage
To scrape places and reviews in your desired location:1. **Run the script:**
```bash
python google_map_scraper.py2. **Output:**
The script will output the name, rating, phone number, address, and reviews for each place.
Example output:
```bash
Name: Vegetarian Restaurant XYZ
Rating: 4.5
Phone Number: +1-234-567-890
Address: 123 Main St, Your City, Country
URL: https://www.google.com/maps/place/...
Reviews:
- {'author': 'John Doe', 'date': '1 month ago', 'text': 'Great food!'}
- {'author': 'Jane Smith', 'date': '2 weeks ago', 'text': 'Excellent service!'}## Contributing
We welcome contributions to GoogleMapsScraper! Feel free to fork the repository, create a branch, and submit a Pull Request with your improvements or new features.## License
This project is licensed under the MIT License. See the LICENSE file for more information.