How why2lyj/youxiang-itchat works
Youxiang is a Python WeChat coupon-promotion assistant. Its main workflow starts the WeChat client, schedules configured platform jobs, fetches affiliate offers, and delivers product images and promotional text to selected groups. Separate chat handlers provide friend and group auto-replies, group-entry welcomes, and image moderation; Tencent NLP supplies the documented smart-chat option. The README also documents Taobao, JD, Pinduoduo, Suning, and unfinished Vipshop distribution. Several platform implementations are unsampled, so their internal call relationships are not inferred.
Main entry points: scheduler.py Job scheduler · wechat.py WeChat client · delivery.py Group delivery · pdd.py Pinduoduo offers
Components 24
Application runtime
- Program entry
main.py - Configuration
untils/config.py - Job scheduler
untils/scheduler.py - Retry helper
untils/retry.py - Common utilities
untils/common.py - Ad utilities
untils/ad.py
WeChat interaction
- WeChat client
chat/wechat.py - Chat utilities
chat/itchatHelper.py - Message handlers
chat/message.py - Tencent smart chat
untils/qq_nlpchat.py
Coupon distribution
- Group delivery
coupon/delivery.py - Price formatting
coupon/pricing.py
Platform integrations
- Taobao offers
coupon/tb.py - JD offers
coupon/jd.py - Pinduoduo offers
coupon/pdd.py - Suning offers
coupon/sn.py - Vipshop offers
coupon - Taobao API client
untils/tb_top_api.py - JD API client
untils/jd_api.py - Pinduoduo API client
untils/pdd_api.py - JD URL shortener
untils/suo_im.py
Other components
- Operator
- Affiliate platforms
- WeChat service
Connections 35
- Operator → Program entry: starts
README.md - Program entry → WeChat client: runs
main.py - WeChat client → Configuration: reads
chat/wechat.py - WeChat client → Job scheduler: starts jobs
chat/wechat.py - WeChat client → Message handlers: registers handlers
chat/wechat.py - WeChat client → Chat utilities: initializes
chat/wechat.py - Message handlers → Tencent smart chat: requests replies
chat/message.py - Message handlers → Chat utilities: uses
chat/message.py - Chat utilities → Configuration: reads
chat/itchatHelper.py - WeChat client → WeChat service: connects
README.md - Job scheduler → Configuration: loads jobs
untils/scheduler.py - Job scheduler → JD offers: dispatches
untils/scheduler.py - Job scheduler → Pinduoduo offers: dispatches
untils/scheduler.py - Job scheduler → Taobao offers: schedules offers
- Job scheduler → Suning offers: schedules offers
- Job scheduler → Vipshop offers: planned offers
README.md - Taobao offers → Taobao API client: queries
coupon/tb.py - Taobao offers → Group delivery: delivers
coupon/tb.py - Taobao offers → Price formatting: formats prices
coupon/tb.py - JD offers → JD API client: queries
coupon/jd.py - JD offers → JD URL shortener: shortens links
coupon/jd.py - JD offers → Group delivery: delivers
coupon/jd.py - Pinduoduo offers → Pinduoduo API client: queries
coupon/pdd.py - Pinduoduo offers → Retry helper: retries calls
coupon/pdd.py - Pinduoduo offers → Price formatting: formats prices
coupon/pdd.py - Pinduoduo offers → Group delivery: delivers images
coupon/pdd.py - Suning offers → Group delivery: sends images
coupon/sn.py - Suning offers → WeChat service: sends messages
coupon/sn.py - Taobao API client → Affiliate platforms: calls
README.md - JD API client → Affiliate platforms: calls
README.md - Pinduoduo API client → Affiliate platforms: calls
README.md - Group delivery → Common utilities: saves images
coupon/delivery.py - Group delivery → WeChat service: sends content
coupon/delivery.py - Tencent smart chat → Affiliate platforms: requests NLP
untils/qq_nlpchat.py - Message handlers → Ad utilities: uses
chat/message.py