Skip to content

Vette1123/noon-deals-bot

Repository files navigation

Noon Deals Bot

Auto-posts the best discounted products from noon.com Egypt to a Telegram channel, 6Γ— a day β€” fully free to run, no login required.

  • Scrapes noon's deal pages using curl_cffi (Chrome TLS impersonation β€” no paid API)
  • Attaches your influencer coupon code to every post as tap-to-copy text
  • Posts Arabic-formatted product cards with images to Telegram
  • Runs on GitHub Actions β€” no server required

How it works

GitHub Actions (cron, 6Γ—/day)
        β”‚
        β–Ό
   fetch 2 pages of deals  ── curl_cffi + Chrome fingerprint ──▢  noon.com
        β”‚
        β–Ό
   filter new deals (β‰₯5% off, not already posted)
        β”‚
        β–Ό
   post to Telegram channel with:
     β€’ product image
     β€’ Arabic-formatted card
     β€’ tap-to-copy coupon code (e.g. gado1996)
     β€’ "Buy now" button β†’ bare noon.com product URL
        β”‚
        β–Ό
   commit updated state.json / posted.json

Attribution model: users tap the coupon code in the message (copies to clipboard on mobile), click "Buy now", and paste the coupon at noon's checkout. The coupon both gives the customer a discount and attributes the sale to you β€” no affiliate API, no login, no session management.

Page cursor: each run scrapes 2 pages and advances; after page 10 the cursor resets to 1 and posted.json is cleared so deals can be re-posted on the next cycle.

Project layout

File Purpose
main.py Entry point β€” orchestrates fetch β†’ filter β†’ post
scraper.py Fetches & parses noon.com catalog pages (RSC + fallbacks)
filters.py Filters out already-posted SKUs and low-discount products
telegram_poster.py Formats & posts product cards to Telegram (includes coupon line)
posted.json SKUs already posted this cycle (reset at page wraparound)
state.json {"next_page": N} β€” pagination cursor

Local setup

pip install -r requirements.txt
cp .env.example .env  # fill in values
python main.py --dry-run   # prints what would be posted, skips Telegram
python main.py             # real run

Required secrets (GitHub Actions)

Secret Purpose
TELEGRAM_BOT_TOKEN Bot that posts to the channel
TELEGRAM_CHANNEL_ID Channel handle (e.g. @noon_hot_deals)
NOON_COUPON_CODE (optional) Your noon influencer coupon. Defaults to gado1996.

That's it β€” three secrets, two of them truly required. No scraping API key, no noon.partners login, no session rotation, no OTP flow.

Running tests

pip install -r requirements-dev.txt
pytest

Schedule

Cron 0 4,8,12,16,20,0 * * * UTC β†’ 6Γ—/day (every 4 hours). Triggered by .github/workflows/bot.yml or manually via workflow_dispatch.

About

πŸ€– Automated Telegram bot that scrapes & posts the best deals from noon.com Egypt every 4 hours β€” with coupon code support. Runs free on GitHub Actions, no server needed.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages