CodeTheft - AI-Powered Code Scraping & Enhancement Tool 🚀
CodeTheft is a cutting-edge web scraping tool specifically designed for developers to extract, filter, and enhance code from web pages using advanced AI capabilities. Perfect for learning, research, and code discovery.
✨ Features Stealthy Code Scraping - Extract raw code from any webpage without detection
AI-Powered Enhancement - Clean and improve scraped code with Gemini AI
Precision Filtering - Isolate only the relevant code snippets
Multi-Source Support - Works with GitHub, GitLab, StackOverflow, and more
Export Options - Download enhanced code in multiple formats
Rate Limit Bypass - Intelligent request throttling to avoid blocks
🛠 Tech Stack Deep Dive Core Scraping Engine Browserless API - Headless browser automation for scraping dynamic content
Bypasses anti-bot measures
Renders JavaScript-heavy pages
Simulates human-like browsing patterns
Cheerio - Lightweight jQuery implementation for server-side DOM manipulation
Blazing fast HTML parsing
CSS-selector based element targeting
Efficient code extraction from raw HTML
AI Enhancement Google Gemini AI - State-of-the-art AI for code analysis and enhancement
Code cleanup and formatting
Syntax error detection
Performance optimization suggestions
Documentation generation
Backend Node.js (v20) - JavaScript runtime for high-performance scraping
Express.js - Minimalist web framework for API endpoints
Axios - HTTP client for API requests
Rate Limiter - Intelligent request throttling to avoid IP bans
Frontend Next.js - Interactive UI
Shadcn - Modern component library
Utility Libraries Puppeteer Extra - Enhanced scraping capabilities
Stealth Plugin - Avoid fingerprinting detection
User-Agent Rotator - Randomize request signatures
🚀 Getting Started Prerequisites Node.js v18+ Next.js v15
Browserless API key
Google Gemini API key
Installation bash
git clone https://github.com/ghosttrozan/codetheft.git
cd codetheft npm install
cp .env.example .env
npm run dev
Custom scraping patterns
AI enhancement parameters
Rate limit configuration
Proxy rotation setup
Website terms of service
Copyright laws
Fair use principles
Always obtain proper authorization before scraping any website.
Made with ❤️ (and a bit of mischief) by Alkaif