Ecommerce Logistics
/install ecommerce-logistics
E-commerce Logistics Aggregator(电商物流聚合)
Query order logistics from Taobao, JD.com, Pinduoduo, and Douyin with persistent authentication.
Features
- 🔗 Multi-platform: Taobao, PDD (JD & Douyin not supported due to anti-bot)
- 🔒 Persistent login: Cookie storage, no repeated logins
- 🛡️ Stealth mode: Bypass basic anti-bot detection
- ⏱️ Rate limiting: Built-in request throttling
- 📱 QR login: Graceful handling of expired sessions
- 🚚 In-transit filter: Only show orders currently in transit
Setup
# Install dependencies
cd scripts && npm install
# Required environment variables (optional, for headless operation)
export ECOM_LOGISTICS_DATA_DIR="$HOME/.ecommerce-logistics"
Usage
First Time: Login to Platforms
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
Query Logistics
# 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
QR Login Process
When cookies are missing or expired:
- The skill opens a browser window with the platform login page
- A QR code screenshot is saved to
~/.ecommerce-logistics/{platform}-qr.png - Scan the QR code with the platform's mobile app
- Complete login in the browser window
- Cookies are automatically saved for future use
Note: If you see "Cookie 已过期,需要重新登录", run the login command again.
Cookie Storage
Cookies are stored encrypted in:
- Default:
~/.ecommerce-logistics/cookies/ - Each platform has separate cookie file
- Auto-refresh on expiration
Architecture
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
Error Handling
| Error | Handling |
|---|---|
| Cookie expired | Prompt QR re-login |
| Rate limited | Auto-backoff retry |
| Login page detected | Graceful error with instructions |
| Network timeout | 3 retries with exponential backoff |
Platform Support Status
| Platform | Status | Notes |
|---|---|---|
| Taobao | ✅ Available | Order list + logistics info |
| JD | ❌ Unsupported | Anti-bot detection too strict |
| PDD | ✅ Available | Order list + tracking number + pickup code |
| Douyin | ❌ Unsupported | Requires mobile app access |
Implementation Notes
Anti-Detection Measures
The skill implements several stealth techniques:
- navigator.webdriver override - Hides automation flag
- Plugins spoofing - Simulates real browser plugins
- Viewport & User-Agent - Uses realistic desktop/mobile profiles
- Permissions API - Overrides notification permissions
- Playwright-specific cleanup - Removes
__playwrightproperties
Rate Limiting
Each platform has independent rate limits:
| Platform | Max Requests | Window |
|---|---|---|
| Taobao | 10 | 60s |
| JD | 15 | 60s |
| PDD | 8 | 60s |
| Douyin | 10 | 60s |
Cookie Expiration
- Cookies are considered expired after 30 days
- Expired cookies trigger QR re-login prompt
- Each platform stores cookies independently
Development
Updating Selectors
Platform websites change frequently. Update selectors in:
references/selectors.md- Documentationsrc/adapters/*-adapter.ts- Implementation
Testing
# 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
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install ecommerce-logistics - After installation, invoke the skill by name or use
/ecommerce-logistics - Provide required inputs per the skill's parameter spec and get structured output
What is Ecommerce Logistics?
Aggregate logistics information from Taobao, JD, PDD, and Douyin. One-click query for multi-platform order tracking. Supports persistent cookie storage and Q... It is an AI Agent Skill for Claude Code / OpenClaw, with 113 downloads so far.
How do I install Ecommerce Logistics?
Run "/install ecommerce-logistics" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Ecommerce Logistics free?
Yes, Ecommerce Logistics is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Ecommerce Logistics support?
Ecommerce Logistics is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Ecommerce Logistics?
It is built and maintained by charles-lpf (@charles-lpf); the current version is v1.0.0.