GOG Sales Analytics
Automated weekly workflow: scrape GOG discounts → Gemini analysis → Feishu Drive report.
What It Does
- Scrape — Fetches all currently discounted games from the GOG catalog API (paginated, no auth needed)
- Analyze — Sends full discount dataset to Google Gemini for deal analysis, trend comparison, and budget recommendations
- Upload — Syncs the markdown report to a Feishu Drive folder with proper multipart upload
Prerequisites
- Python 3.10+
- Environment variables (set in
.envor environment):GEMINI_API_KEY— Google Gemini API keyFEISHU_APP_ID— Feishu app IDFEISHU_APP_SECRET— Feishu app secretFEISHU_DRIVE_FOLDER_ID— Target Feishu Drive folder token
Usage
pip install -r requirements.txt
python main.py
Or import individual modules:
from scraper.gog_api_scraper import scrape_and_save
from analysis.gemini_analyzer import analyze_sales_data
from sync.feishu_upload import upload_file_to_feishu
sales_file = scrape_and_save()
report_file = analyze_sales_data(sales_file)
url = upload_file_to_feishu(report_file, folder_id)
File Structure
├── main.py # Workflow orchestrator
├── scraper/
│ └── gog_api_scraper.py # GOG catalog API scraper
├── analysis/
│ └── gemini_analyzer.py # Gemini-powered analysis
├── sync/
│ └── feishu_upload.py # Feishu Drive upload
├── requirements.txt
├── .env.example
└── SKILL.md
Notes
- GOG catalog API requires no authentication
- Gemini analysis processes the full discount dataset (no truncation)
- Feishu upload uses the
upload_allmultipart endpoint - Scraping is rate-limited (0.5s between pages)