A tool to help post Google reviews for businesses by automating the review process.
- Simple Review: Post a 4-5 star review with random positive text
- Custom Review: Post a review with your own star rating and text
- Direct Review URL: Generate a direct URL for posting reviews
- Google Places API Integration: Extract business information and place ID using the Google Places API
- Google Account Login: Automatically logs in to Google before posting reviews
- Debug Logs: All operations are logged for troubleshooting
- Python 3.6+
- Chrome browser installed
- Required Python packages (see requirements.txt)
- Valid Google account credentials in accounts.yaml
- Google Places API key (for enhanced place ID extraction)
- Clone or download this repository
- Install the required packages:
pip install -r requirements.txt- Set up your Google account credentials in accounts.yaml:
accounts:
- username: your_email@gmail.com
password: your_password- Set up your Google Places API key:
- Copy the
.env.examplefile to.env - Get an API key from Google Cloud Platform
- Add your API key to the
.envfile:
GOOGLE_PLACES_API_KEY=your_api_key_here - Copy the
Run the menu interface:
python review_menu.py- Set Business URL: Enter the Google Maps URL for the business
- Generate Direct Review URL: Create a direct URL for posting reviews
- Post Simple Review: Post a 4-5 star review with random positive text
- Post Custom Review: Post a review with your own star rating and text
- View Debug Logs: View logs from previous operations
- Exit: Close the application
- Set Business URL
- Generate Direct Review URL (optional but recommended)
- Post a Simple or Custom Review
- Check Debug Logs if any issues occur
The scripts now automatically log in to Google before posting reviews. This is required as Google only allows logged-in users to post reviews.
To set up your Google account:
- Edit the
accounts.yamlfile - Add your Google account credentials
- You can add multiple accounts if needed
Example accounts.yaml:
accounts:
- username: your_email@gmail.com
password: your_password
- username: another_email@gmail.com
password: another_passwordThe application now uses the Google Places API to extract business information and get the place ID for generating direct review URLs. This provides a more reliable way to generate review URLs compared to extracting place IDs directly from URLs.
To use this feature:
- Get a Google Places API key from Google Cloud Platform
- Add your API key to the
.envfile - The application will automatically use the API to get the place ID when generating direct review URLs
If the API key is not provided or the API call fails, the application will fall back to the previous method of extracting place IDs directly from URLs.
The scripts save all logs to timestamped folders in the debug_files directory. This helps keep the main directory clean and organizes debugging information for each run.
Each debug folder contains:
- Error logs if any issues occur
- Screenshots of key steps in the process
- Login process screenshots for troubleshooting
- API responses from the Google Places API (when used)
The direct review URL feature creates a URL that opens directly to the review form for a business. This is more reliable than trying to navigate to the review form from the business page.
To generate a direct review URL:
- Set the business URL first
- Select "Generate Direct Review URL" from the menu
- The URL will be saved to
direct_review_url.txt
The application now uses the following process to generate direct review URLs:
- Extract the business name from the URL
- Use the Google Places API to get the place ID for the business
- Generate a direct review URL using the place ID
- If the API call fails, fall back to extracting the place ID directly from the URL
If you encounter issues:
- Check the debug logs for error messages
- Make sure Chrome is installed and not already running
- Verify that the business URL is correct
- Try generating a direct review URL if the regular URL doesn't work
- Check if your Google Places API key is valid and has the necessary permissions
- The scripts use undetected_chromedriver to avoid detection
- If undetected_chromedriver fails, it will fall back to standard Chrome driver
- The scripts will automatically use the direct review URL if available
This project is for educational purposes only. Use responsibly and in accordance with Google's terms of service.
This tool is provided for educational purposes only. Use at your own risk. The authors are not responsible for any misuse or violations of terms of service. # google_review_generator