Aggregate logistics information from Taobao, JD, PDD, and Douyin. One-click query for multi-platform order tracking. Supports persistent cookie storage and Q...
Query order logistics from Taobao, JD.com, Pinduoduo, and Douyin with persistent authentication.
bash
# Install dependencies
cd scripts && npm install
# Required environment variables (optional, for headless operation)
export ECOM_LOGISTICS_DATA_DIR="$HOME/.ecommerce-logistics"
bash
cd scripts
# Login to Taobao (opens browser for QR scan)
npm run query -- --platform taobao --login
# Login to PDD
npm run query -- --platform pdd --login
# Note: JD and Douyin are not supported due to strict anti-bot measures
bash
# Query all platforms (requires prior login)
npm run query -- --all
# Query specific platform
npm run query -- --platform taobao
npm run query -- --platform pdd
# Query with custom data directory
npm run query -- --all --data-dir /path/to/cookies
# Run in headless mode (no browser window)
npm run query -- --all --headless
When cookies are missing or expired:
~/.ecommerce-logistics/{platform}-qr.pngNote: If you see "Cookie 已过期,需要重新登录", run the login command again.
Cookies are stored encrypted in:
~/.ecommerce-logistics/cookies/text
scripts/src/
├── index.ts # CLI entry
├── core/
│ ├── aggregator.ts # Main orchestrator
│ ├── auth-manager.ts # Cookie & QR login
│ ├── rate-limiter.ts # Request throttling
│ └── stealth-browser.ts # Anti-detection browser
├── adapters/
│ ├── base-adapter.ts # Abstract base class
│ ├── taobao-adapter.ts
│ ├── jd-adapter.ts
│ ├── pdd-adapter.ts
│ └── douyin-adapter.ts
└── types/
└── index.ts # TypeScript interfaces
references/
└── selectors.md # Platform-specific CSS selectors
ErrorHandlingCookie expiredPrompt QR re-loginRate limitedAuto-backoff retryLogin page detectedGraceful error with instructionsNetwork timeout3 retries with exponential backoff
PlatformStatusNotesTaobao✅ AvailableOrder list + logistics infoJD❌ UnsupportedAnti-bot detection too strictPDD✅ AvailableOrder list + tracking number + pickup codeDouyin❌ UnsupportedRequires mobile app access
The skill implements several stealth techniques:
__playwright propertiesEach platform has independent rate limits:
PlatformMax RequestsWindowTaobao1060sJD1560sPDD860sDouyin1060s
Platform websites change frequently. Update selectors in:
references/selectors.md - Documentationsrc/adapters/*-adapter.ts - Implementationbash
# Compile TypeScript
cd scripts && npm run build
# Run in development mode
npm run dev -- --platform taobao
# Debug with visible browser
npm run query -- --platform taobao --headless=false