This is a Google Maps scraper. It uses Playwright library to web scraping and data extraction from Google Maps.
This scraper will extract the following information list from the Google Maps:
- name: Store name
- review_count: Total number of reviews
- review_average: Average review rating
- infos: Store service information (e.g., ["Dine-in", "Takeout", "Delivery Service"])
- opens_at: Store opening time (e.g., "Opens at 12:00 PM")
- address: Store address
- website: Store website
- phone: Store phone number
- place_type: Place type (e.g., "Restaurant")
- reviews: List of detailed review information
- review_name: Reviewer name
- review_info: Number of reviews and photos
- review_content: Review content
- review_rate: Review rating
- review_image_urls: List of review image URLs
- review_at: Review posted time (e.g., "1 week ago")
[
{
"name": "Store Name",
"review_count": 756,
"review_average": 4.2,
"infos": [
"매장 내 식사",
"테이크아웃",
"배달 서비스"
],
"opens_at": "오후 12:00에 영업 시작",
"address": "25 The West Mall, Etobicoke, ON M9C 1B8 캐나다",
"website": "sample.com",
"phone": "+1 416-641-7327",
"place_type": "음식점",
"reviews": [
{
"review_name": "reviewer name",
"review_info": "리뷰 19개 · 사진 12장",
"review_content": "So good~~",
"review_rate": 5,
"review_image_urls": [
"https://sample.com/p/-k-no",
"https://sample.com/p/-k-no2"
],
"review_at": "1주 전"
},
...- python >= 3.10
- chromium
-
Clone this repository:
git clone https://github.com/kimyk0120/google_maps_scraper
-
Move to the project directory
-
Install the required Python packages:
pip install -r requirements.txt
To use this script, follow these steps:
- You need to configure the necessary settings in the {project}/config/config.ini file.
- You must write the path to the chromium executable in "chromium_path".
chromium_path = C:\Users\kimyk\Downloads\chrome-win\chrome-win\chrome.exe- or
Leavechromium_pathempty and runplaywright install``
- Set "timout_sec" appropriately to prevent infinite loading.
- Set the maximum number of businesses to scrape with the "store_limit_cnt" setting.
- Set the maximum number of reviews to scrape with the "review_limit_cnt" setting.
- If you need proxy settings, put them in "proxy_server"
python main.py "search term" If you need to change the output path, do as follows.
python main.py "search term" --output "ouput path"- 2024.12.20
For any feedback or queries, please reach out to me at kimyk0120@gmail.com.