This Python script utilizes the Playwright library to perform web scraping and data extraction from Google Maps. It is particularly designed for obtaining information about businesses, including their name, address, website, phone number, reviews, and more.
- Install Python dependencies: pip install -r requirements.txt
2.Install Playwright browsers: playwright install
Run the script with your desired search term and number of results:
python main.py -s "Coffee shops on the moon" -t 20-sor--search: Search query for Google Maps (default: "turkish stores in toronto Canada")-tor--total: Number of results to scrape (default: 1)-oor--output: Output CSV file path (default: result.csv)--append: Append results to the output file instead of overwriting (default: off)
- Avoid running too many scrapes in a short period to prevent being blocked by Google.
- Also check your browser path on the main.py file most people chrome is located at C:\Program Files\Google\Chrome\Application\chrome.exe. it is located on line 116(it might change)