Skip to content

BasicFist/scrapox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

13 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

๐ŸŽฎ Scrapox - Roblox Promo Code Scraper

Beautiful, fast, and smart Roblox promo code aggregator

Python License Code style


โœจ Features

  • ๐Ÿš€ 10+ Sources - Aggregates from RobloxDen, GamesRadar, PocketTactics, and more
  • โšก Parallel Scraping - All sources scraped simultaneously (3-5 seconds total)
  • ๐Ÿง  Smart Deduplication - Reliability-weighted code selection
  • ๐ŸŽจ Beautiful TUI - Interactive Terminal UI with Textual (NEW!)
  • ๐Ÿ”’ Rate Limiting - Prevents IP bans (10s between requests per source)
  • ๐Ÿ“Š Source Tracking - Reliability ratings and statistics
  • ๐Ÿ”” Notifications - Discord and Telegram support
  • ๐Ÿ’พ SQLite Database - Persistent storage with history

๐Ÿš€ Quick Start

Installation

# Clone repository
git clone https://github.com/yourusername/scrapox.git
cd scrapox

# Install dependencies
pip install -r requirements.txt

# Or install as package
pip install -e .

Usage

# ๐ŸŽจ Launch interactive TUI (NEW!)
scrapox tui

# Scrape all sources once
scrapox scrape

# Continuous monitoring (every 2 hours)
scrapox monitor --interval 2

# Browse codes with filters
scrapox list --status active --sort-by reliability

# View source statistics
scrapox stats

See TUI Guide for detailed TUI documentation.


๐Ÿ“Š Example Output

  โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  โ•‘  ๐ŸŽฎ Scrapox - Roblox Code Scraper    โ•‘
  โ•‘  โœจ Discover the latest codes!        โ•‘
  โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

โ ‹ ๐Ÿ” Scraping 10 sources... โ”โ”โ”โ”โ”โ”โ” 80%

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿ“ˆ Scrape Results โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ ๐Ÿ†• New Codes: 5                         โ”‚
โ”‚ ๐Ÿ“Š Total Active: 68                     โ”‚
โ”‚ โฑ๏ธ  Duration: 3.45s                     โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

         โœจ ๐Ÿ†• New Codes โœจ
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚๐ŸŽฏ Code โ”‚๐Ÿ“ฆ Item    โ”‚๐ŸŒ Sourceโ”‚โญStatusโ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚CODE123 โ”‚Cool Item  โ”‚RobloxDenโ”‚ โœ… โญโญโญโ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

๐Ÿ—๏ธ Architecture

Scrapox uses a pragmatic 3-tier architecture:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Tier 1: Interface Layer             โ”‚
โ”‚ โ€ข CLI (cli.py) - Command interface  โ”‚
โ”‚ โ€ข TUI (tui.py) - Interactive UI     โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Tier 2: Business Logic              โ”‚
โ”‚ โ€ข scraper.py - Async orchestration  โ”‚
โ”‚ โ€ข monitor.py - Scheduled scraping   โ”‚
โ”‚ โ€ข parsers.py - HTML extraction      โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Tier 3: Data & Services             โ”‚
โ”‚ โ€ข database.py - SQLite persistence  โ”‚
โ”‚ โ€ข notifications.py - Alerts         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Design Philosophy: Simple over complex, working over perfect


๐Ÿ“ Project Structure

scrapox/
โ”œโ”€โ”€ scrapox/              # Main package
โ”‚   โ”œโ”€โ”€ __init__.py       # Package metadata
โ”‚   โ”œโ”€โ”€ cli.py            # CLI interface
โ”‚   โ”œโ”€โ”€ tui.py            # Terminal UI (Textual)
โ”‚   โ”œโ”€โ”€ scraper.py        # Core scraping logic
โ”‚   โ”œโ”€โ”€ database.py       # SQLite operations
โ”‚   โ”œโ”€โ”€ monitor.py        # Continuous monitoring
โ”‚   โ”œโ”€โ”€ parsers.py        # HTML extraction
โ”‚   โ””โ”€โ”€ notifications.py  # Discord/Telegram
โ”œโ”€โ”€ tests/                # Test suite (60% coverage)
โ”œโ”€โ”€ docs/                 # Documentation
โ”‚   โ””โ”€โ”€ TUI_GUIDE.md      # TUI usage guide
โ”œโ”€โ”€ config.yaml           # Configuration
โ”œโ”€โ”€ requirements.txt      # Dependencies
โ””โ”€โ”€ README.md             # This file

โš™๏ธ Configuration

Edit config.yaml to customize:

  • Sources: Enable/disable sources, change URLs
  • Rate Limiting: Adjust requests per minute
  • Notifications: Configure Discord/Telegram webhooks
  • Database: Change database path

Environment Variables

For secrets (optional):

export SCRAPOX_DISCORD_WEBHOOK="https://discord.com/api/webhooks/..."
export SCRAPOX_TELEGRAM_BOT_TOKEN="123456789:ABC..."
export SCRAPOX_TELEGRAM_CHAT_ID="987654321"

๐Ÿงช Testing

# Run all tests
pytest

# With coverage report
pytest --cov=scrapox --cov-report=html

# Run specific test
pytest tests/test_deduplication.py

Target: 60% test coverage (pragmatic goal)


๐Ÿ“ˆ Performance

Metric Target Actual
Scrape Duration (10 sources) < 5s 3-5s โœ…
Memory Usage < 100MB ~60MB โœ…
Database Size (100k codes) ~50MB ~45MB โœ…

๐Ÿ› ๏ธ Development

Setup Development Environment

# Clone repo
git clone https://github.com/yourusername/scrapox.git
cd scrapox

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install with dev dependencies
pip install -r requirements.txt
pip install -e .

Running Locally

# Run scraper
python -m scrapox scrape

# Run with debug logging
python -m scrapox scrape --config config.yaml

๐Ÿ” Security

  • โœ… Rate limiting - Prevents IP bans
  • โœ… Code validation - Alphanumeric only, max 20 chars
  • โœ… Parameterized queries - SQL injection prevention
  • โœ… Environment variables - No secrets in code
  • โœ… Public data only - No authentication bypass

๐Ÿ“ License

MIT License - see LICENSE file


๐Ÿ™ Credits

Sources:

  • RobloxDen, GamesRadar, PocketTactics, FossBytes
  • SimplyCodes, Times of India, Eldorado.gg
  • PCGamer, TheSpike.gg, MyRidima

Built With:

  • Python, aiohttp, BeautifulSoup4
  • Textual (interactive TUI framework)
  • Rich (terminal styling)
  • SQLite, PyYAML, structlog

๐Ÿ“ž Support


Made with โค๏ธ for the Roblox community

About

Beautiful Roblox promo code scraper with interactive TUI

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •