Skip to content

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.

Notifications You must be signed in to change notification settings

Ractorrr/client-net

Repository files navigation

Freelance Lead Generation & Proposal Automation

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.

Features

  • 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.

Prerequisites

  • Python 3.8+
  • Google Gemini API Key
  • Chrome Browser (for Selenium scraping)

Installation

  1. Clone the repository

    git clone <your-repo-url>
    cd freelancer
  2. Set up a virtual environment

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies

    pip install -r requirements.txt
  4. Configure Environment Create a .env file in the root directory and add your Gemini API key:

    GEMINI_API_KEY=your_api_key_here

Usage Workflow

1. Scrape Leads from Google Maps

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.json

Options:

  • --headless: Run browser in background.
  • --max-reviews: Number of reviews to scrape (default 15).

2. (Optional) Scrape Website Content

Gather more context from the business websites found in step 1.

python website_scraper.py --file leads.json

3. Generate Proposals

Use AI to generate personalized proposals based on the scraped data.

python generate_proposals.py --input leads.json --output leads_with_proposals.json

Options:

  • --model: Choose model (default gemini-1.5-flash).
  • --prompt: Use a custom prompt file (e.g., prompts/highprofile.txt).

4. Generate WhatsApp Links

Create clickable WhatsApp links for easy outreach.

python generate_whatsapp_links.py

This will generate leads_english.json, leads_hinglish.json, and leads_all.json containing the whatsapp_link field.

Project Structure

  • 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).

License

MIT

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages