Initial commit: Pokemon Discovery - TCG product scraper and PDF catalog generator
- 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
This commit is contained in:
31
run.sh
Executable file
31
run.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/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."
|
||||
Reference in New Issue
Block a user