Telegram bot untuk monitoring Como 1907 football shop dengan automatic notifications untuk new products, size changes, dan discounts.
/start- Welcome message + command overview/help- Detailed command explanations/sizesequence- Show products dengan size tidak urut/sizetype- Show products dengan size type "option"/refresh- Manual update data + detect changes/subscribe- Subscribe untuk auto-notifications/unsubscribe- Stop notifications
- Auto-refresh: Setiap 1 jam
- Change detection: Compare dengan data sebelumnya
- Smart notifications: Hanya kirim kalau ada changes
- Notification types:
- 🆕 New products added
- 📐 Size sequence changes (fixed/broken)
- 💰 New discounts available
- Smart parsing: Handle berbagai format size
- Clothing sizes: XS, S, M, L, XL, XXL, 2XL, 3XL
- Numeric ranges: 36/37, 38/39, 40/41
- Age formats: 5-6A, 7-8A, 910A, 1314
- Mixed formats: S/46, M/48, L/50
- Combinations: S/M, M/L, L/XL
pip install -r requirements.txt- Clone repository
git clone https://github.com/Veloruze/shop-comofootball-bot.git
cd shop-comofootball-bot- Install dependencies
pip install -r requirements.txt-
Setup Telegram Bot Token
- Chat dengan @BotFather di Telegram
- Create new bot:
/newbot - Follow instructions dan copy bot token
-
Create
.envfile
# Create .env file in project root
TELEGRAM_BOT_TOKEN=your_bot_token_here- Run bot
python como_telegram_bot.py- NEVER commit
.envfile ke git .envsudah included di.gitignore- Bot token is loaded from environment variable
- Keep your token secure and private
python como_telegram_bot.pypython scrape_como.pyproduct_id- Unique product identifiertitle- Product namecurrent_price- Current selling price (€X.XX)original_price- Original price before discountdiscount_amount- Discount amount (€X.XX)discount_percent- Discount percentage (X.X%)handle- URL slugsize_type- Size option type (Taglia/option/Default Title)size- Available sizes (comma-separated)size_sequential- Size sequence status (Yes/No/-)description- Cleaned product description
- History files: Auto-delete, keep only 2 most recent
- Subscriber data: Persistent JSON storage
- Main data: Always fresh CSV export
- Scraper (
scrape_como.py) - Data extraction engine - Bot (
como_telegram_bot.py) - User interface + notifications - Auto-refresh - Background monitoring system
- Change detection - Compare current vs previous data
Como Shop API → Scraper → CSV Data → Change Detection → Notifications → Users
# Sequential
"XS,S,M,L,XL" → "Yes"
"36/37,38/39,40/41" → "Yes"
"5-6A,7-8A,910A" → "Yes"
# Non-sequential
"XS,XXS,XXXS" → "No" (descending)
"S,L,M,XL" → "No" (wrong order)
"S/46,L/48" → "No" (missing M)
# Not applicable
"Default" → "-"
"Add name/number" → "-"🔔 Auto-Update Notification
🆕 New Products (2 found)
• Como 1907 Away Jersey - €75.00
• Training Shorts - €29.90
💰 New Discounts (1 found)
• Como 1907 Home Jersey
€39.95 (was €79.90) - 50.0%
Data Source: https://shop.comofootball.com/products.json
- Shopify JSON API
- Pagination support
- 343+ products total
- Fork repository
- Create feature branch
- Make changes
- Test thoroughly
- Submit pull request
MIT License - Feel free to use and modify
Built with ❤️ for Como 1907 fans