A suite of Python tools designed to automate the process of finding freelance leads from Google Maps, analyzing their online presence, and generating highly personalized proposals using Google's Gemini AI.
- Google Maps Scraper: Extracts business details (Name, Phone, Website, Reviews, Ratings) from Google Maps search results.
- Website Scraper: Visits business websites to gather deeper insights (About text, Services, Emails, Social Links).
- AI Proposal Generator: Uses Gemini 1.5 Flash/Pro to write personalized proposals in "Hinglish" (Hindi-English mix) or English, referencing specific customer reviews and business details.
- WhatsApp Link Generator: Creates ready-to-send WhatsApp links with the generated proposal pre-filled.
- Python 3.8+
- Google Gemini API Key
- Chrome Browser (for Selenium scraping)
-
Clone the repository
git clone <your-repo-url> cd freelancer
-
Set up a virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Configure Environment Create a
.envfile in the root directory and add your Gemini API key:GEMINI_API_KEY=your_api_key_here
Search for businesses (e.g., "Hotels in Bhopal") and scrape the results.
python google_maps_scraper.py --url "https://maps.app.goo.gl/..." --output leads.jsonOptions:
--headless: Run browser in background.--max-reviews: Number of reviews to scrape (default 15).
Gather more context from the business websites found in step 1.
python website_scraper.py --file leads.jsonUse AI to generate personalized proposals based on the scraped data.
python generate_proposals.py --input leads.json --output leads_with_proposals.jsonOptions:
--model: Choose model (defaultgemini-1.5-flash).--prompt: Use a custom prompt file (e.g.,prompts/highprofile.txt).
Create clickable WhatsApp links for easy outreach.
python generate_whatsapp_links.pyThis will generate leads_english.json, leads_hinglish.json, and leads_all.json containing the whatsapp_link field.
google_maps_scraper.py: Selenium-based scraper for Google Maps.website_scraper.py: Requests/BeautifulSoup scraper for business websites.generate_proposals.py: Main AI logic using Gemini API.generate_whatsapp_links.py: Utility to format phone numbers and encode messages.prompts/: Directory for storing different system prompts (e.g., for doctors vs. restaurants).