Skip to content

Fix notification loop, add Discord support, and specific Multi-language (English/Turkish)#1

Open
elaxptr wants to merge 8 commits into
tamerks:mainfrom
elaxptr:fix/infinite-notifications
Open

Fix notification loop, add Discord support, and specific Multi-language (English/Turkish)#1
elaxptr wants to merge 8 commits into
tamerks:mainfrom
elaxptr:fix/infinite-notifications

Conversation

@elaxptr

@elaxptr elaxptr commented Dec 27, 2025

Copy link
Copy Markdown

Summary

This PR improves reliability, adds new notification channels, and introduces localization.

1. Bug Fixes & Stability

  • Fixed Infinite Notification Loop: The bot now correctly updates cart_status to prevent spamming the same stock alert.
  • Optimized Performance: Replaced static sleeps with WebDriverWait for faster and more reliable element detection.
  • Crash Prevention: Made pygame optional and pinned urllib3 for Selenium compatibility.
  • Clean Logging: Suppressed verbose error traces when items are simply out of stock.

2. Discord Webhook Support

  • Added optional DISCORD_WEBHOOK_URL configuration.
  • Users can now choose Telegram, Discord, or both for notifications.
  • Fully backward compatible for existing users.

3. Multi-language Support 🌍

  • Replaced hardcoded Turkish strings with a dynamic localization system.
  • Languages: Supports English (en) and Turkish (tr).
  • Default: Defaults to English for broader accessibility.
  • Config: Controlled via LANGUAGE variable in .env.

4. Docker Support 🐳

  • Added Dockerfile and docker-compose.yml for containerized deployment.
  • Run with a single command: docker compose up -d
  • Config files are mounted so you can edit them without rebuilding.

- Fixed bug where cart_status was never updated, causing spam.\n- Replaced hardcoded sleeps with WebDriverWait in scraperHelpers.py.\n- Pinned urllib3<2.0 for Selenium stability.\n- Made pygame optional to prevent crashes on systems without audio support.
- Added optional DISCORD_WEBHOOK_URL configuration.\n- Implemented send_discord_message function.\n- Integrated Discord notifications into the check loop alongside Telegram.
@elaxptr elaxptr changed the title Fix infinite notification loop and improve scraper robustness Fix notification loop, improve robustness, and add Discord Webhook support Dec 27, 2025
@elaxptr elaxptr changed the title Fix notification loop, improve robustness, and add Discord Webhook support Fix notification loop, add Discord support, and specific Multi-language (English/Turkish) Dec 27, 2025
@tamerks

tamerks commented Jan 2, 2026

Copy link
Copy Markdown
Owner

Thank you for your effort. I will take a look mate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants