- Comprehensive scraper for Dollar General Pokemon TCG products - Professional PDF catalog generator with UPC-A barcodes - Robust anti-bot handling with requests + Selenium fallback - Automatic image downloading and barcode generation - Unix-friendly timestamped filenames - Virtual environment support and dependency management - Complete documentation and usage guides
31 lines
794 B
Bash
Executable File
31 lines
794 B
Bash
Executable File
#!/bin/bash
|
|
# Pokemon Discovery - Scraper & Catalog Generator Launcher
|
|
# Automatically activates virtual environment and runs the scraper
|
|
|
|
set -e
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
echo "Pokemon Discovery - Product Scraper & Catalog Generator"
|
|
echo "================================================"
|
|
|
|
# Check if virtual environment exists
|
|
if [[ ! -d "venv" ]]; then
|
|
echo "Creating virtual environment..."
|
|
python3 -m venv venv
|
|
fi
|
|
|
|
# Activate virtual environment
|
|
source venv/bin/activate
|
|
|
|
# Check if requirements are installed
|
|
if ! python -c "import requests, bs4, barcode, selenium" 2>/dev/null; then
|
|
echo "Installing Python requirements..."
|
|
pip install -r requirements.txt
|
|
fi
|
|
|
|
# Run the main script
|
|
python run_scraper.py
|
|
|
|
echo ""
|
|
echo "Script completed. Check the output above for results." |