Skip to content

devgunnu/link-sniper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Link Sniper 🎯

Fight LinkedIn engagement farming by automatically finding real links hidden behind "comment for link" posts.

License Python Chrome

The Problem

LinkedIn is flooded with engagement farming posts like:

"I created a free guide on [topic]. Comment 'interested' and I'll send it to you!"

These posts:

  • Waste your time waiting for links that may never come
  • Farm engagement to boost the poster's algorithm visibility
  • Often lead to newsletter signups or sales funnels

The Solution

Link Sniper is a browser extension + API that automatically finds the actual link by:

  1. Analyzing post content using AI to understand what's being promised
  2. Scraping comments to find links posted by the author
  3. Checking author profiles for website links, featured content, etc.
  4. Web search fallback to find the resource if not found elsewhere

Features

  • 🔍 Smart Detection - Automatically identifies engagement bait posts
  • 🎯 Multi-Source Search - Checks comments, profiles, and web search
  • 🤖 AI-Powered - Uses Google Gemini to understand post context
  • Fast Results - Caches results to avoid repeated searches
  • 🔒 Privacy Focused - No tracking, minimal data collection

Project Structure

link-sniper/
├── backend/                 # FastAPI backend service
│   ├── app/
│   │   ├── api/            # API routes and dependencies
│   │   ├── models/         # Pydantic schemas & DB models
│   │   ├── services/       # Core business logic
│   │   └── utils/          # Utilities and helpers
│   ├── tests/              # Test suite
│   ├── Dockerfile          # Container deployment
│   └── requirements.txt    # Python dependencies
│
├── extension/              # Browser extension (Manifest V3)
│   ├── background/         # Service worker
│   ├── content/            # Content scripts for LinkedIn
│   ├── popup/              # Extension popup UI
│   └── assets/             # Icons and static assets
│
└── README.md

Quick Start

Backend Setup

  1. Clone and navigate to backend:

    cd backend
  2. Create virtual environment:

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

    pip install -r requirements.txt
  4. Set up environment variables:

    cp .env.example .env
    # Edit .env with your API keys
  5. Run the server:

    uvicorn app.main:app --reload
  6. Verify: Open http://localhost:8000/docs to see the API documentation

Extension Setup

  1. Open Chrome Extensions:

    • Navigate to chrome://extensions/
    • Enable "Developer mode" (top right)
  2. Load the extension:

    • Click "Load unpacked"
    • Select the extension/ folder
  3. Configure:

    • Click the Link Sniper icon
    • Open settings and set API endpoint (default: http://localhost:8000/api/v1)
  4. Use:

    • Navigate to a LinkedIn post
    • Click the Link Sniper icon
    • Click "Find Link"

API Endpoints

POST /api/v1/find-link

Find links related to a LinkedIn post.

Request:

{
  "post_url": "https://www.linkedin.com/posts/...",
  "post_content": "Optional pre-extracted content",
  "author_profile_url": "https://www.linkedin.com/in/...",
  "max_comments": 50
}

Response:

{
  "success": true,
  "post_url": "https://www.linkedin.com/posts/...",
  "analysis": {
    "is_engagement_bait": true,
    "confidence": 0.85,
    "expected_link_topic": "productivity guide",
    "keywords": ["productivity", "guide", "free"]
  },
  "links": [
    {
      "url": "https://example.com/guide",
      "source": "comment",
      "relevance_score": 0.92,
      "context": "Here's the link as promised..."
    }
  ],
  "best_match": { ... },
  "processing_time_ms": 1234
}

GET /api/v1/health

Check API health status.

Configuration

Backend Environment Variables

Variable Description Default
APP_ENV Environment (development/production) development
DEBUG Enable debug mode false
GEMINI_API_KEY Google Gemini API key required
DATABASE_URL PostgreSQL connection string -
REDIS_URL Redis connection string redis://localhost:6379/0
RATE_LIMIT_REQUESTS Max requests per window 100
RATE_LIMIT_WINDOW Rate limit window (seconds) 60

Extension Settings

  • API Endpoint: Backend API URL
  • Auto-scan: Automatically detect engagement bait posts

Tech Stack

Backend

  • Framework: FastAPI (Python 3.11+)
  • AI: Google Gemini API
  • Scraping: Playwright
  • Database: PostgreSQL (Supabase)
  • Cache: Redis
  • Deployment: Railway / Docker

Extension

  • Manifest: V3 (Chrome/Firefox compatible)
  • Content Scripts: Vanilla JavaScript
  • Styling: CSS3

Development

Running Tests

cd backend
pytest --cov=app tests/

Linting

cd backend
ruff check .
ruff format .

Building Extension for Production

cd extension
# Zip for Chrome Web Store submission
zip -r link-sniper.zip . -x "*.git*" -x "*.DS_Store"

Roadmap

  • Firefox Add-on support
  • Safari extension
  • Browser history analysis
  • Bulk post scanning
  • API rate limiting tiers
  • Premium features

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Disclaimer

This tool is for educational purposes and personal use. Please respect LinkedIn's Terms of Service and rate limits. The developers are not responsible for any misuse of this tool.


Made with ❤️ to fight engagement farming

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors