What Is ZynU Express XPin?
ZynU Express XPin is a free, open-source Python desktop application for AliExpress affiliate marketers. It handles the entire content pipeline — from product discovery to social media posting — without requiring any third-party SaaS subscriptions, monthly fees, or cloud accounts beyond what you already use.
The tool is built around three core workflows running inside a dark-themed PySide6 desktop GUI: an AliExpress product scraper that calls the official Affiliate API, a Twitter/X automation module that posts AI-generated thread content, and a Pinterest module that uploads product images and publishes pins. Each workflow can also be run standalone from the terminal without the GUI.
Standalone-ready: Every Python module — scraper.py, poster_twitter.py, and poster_pinterest.py — runs independently from the terminal. The GUI is a convenience layer, not a requirement.
Six Files. One Complete System.
The entire application is six Python/Bash files. No heavyweight framework, no database server, no Docker container. Each module has a single responsibility and a clean interface to the others.
Calls the official AliExpress Affiliate API with auto-pagination, rate-limit backoff, and multi-mode deduplication. Outputs CSV, SQL, and JSON.
Generates a structured 7-tweet thread via Groq or Ollama, then posts it using Playwright with persistent browser sessions.
Downloads product images locally, generates pin descriptions with AI, selects a board, and publishes directly via Playwright.
1,900-line dark-themed GUI with tabbed interface, live log output, non-blocking QThread workers, and global settings management.
One-command installer for Linux, macOS, and Windows. Handles Python version detection, system packages (APT on Linux), PySide6, Playwright Chromium, and platform-specific launcher creation — .desktop on Linux, .app bundle on macOS, Start Menu shortcut on Windows.
Alternative Bash installer for Linux Mint, Ubuntu, and Debian. Uses apt-get for system libraries, creates a .desktop entry, desktop shortcut, and ~/.local/bin symlink. Supports --upgrade and --uninstall flags.
🔗 How they connect
The scraper writes output/latest_products.json on every run. Both poster scripts read from this file by default, or from any CSV the scraper previously saved. The GUI imports all three as Python modules and runs their core functions inside non-blocking QThread workers — so the interface stays responsive during long scrapes or live browser sessions.
How the Full Pipeline Works
From keyword to published post, the workflow has four stages. Each stage is independent — you can run them separately, skip stages you don't need, or automate the full sequence.
Enter keywords in the GUI or list_keyword.txt. The scraper calls the AliExpress Affiliate Product Query API, paginates automatically (up to 50 per page), and applies your filters — minimum rating, minimum orders, price range. Raw data is normalised, deduplicated, and saved as CSV + SQL + JSON cache.
Pick a provider — Groq (cloud, fast) or Ollama (local, private). For Twitter, the tool generates a structured 7-tweet thread with a hook, problem, solution, features, value proposition, social proof, and CTA. For Pinterest, it produces a 200–400 character description tuned to the board's tone. Both use product data from the scraper output — no inventing facts.
Playwright opens a real Chromium browser and logs into Twitter or Pinterest using a persistent session stored on disk. After the first manual login, all subsequent runs are fully automated. Posts include the affiliate link, AI-generated copy, and relevant hashtags.
Every successfully posted product ID is recorded in twitter_posted.json and pinterest_posted.json. On the next run, already-posted products are automatically skipped — preventing duplicate posts without any manual bookkeeping.
The Scraper — Official API, Not Web Scraping
The scraper calls the AliExpress Affiliate Product Query API (aliexpress.affiliate.product.query) — the same endpoint used by official affiliate integrations. This means it returns structured product data including prices, ratings, order counts, images, and affiliate links without parsing HTML.
📄 Pagination
Automatically loops through API pages (max 50 per request) until your requested product count is reached or the API is exhausted.
🔒 Signed requests
Every API call is MD5-signed using your App Key and App Secret — exactly as required by the AliExpress authentication spec.
🔁 Smart retry
Rate-limit codes (50, 27) and HTTP 429/503 errors trigger exponential backoff — up to 3 attempts per page before moving on.
🧹 Deduplication
Three dedup modes: by product ID, by normalised title, or both combined — catching the same product listed under different IDs across keywords.
🏷 Auto-tagging
Extracts category tags, keyword tags, and feature keywords (Bluetooth, Waterproof, Fast Charging, etc.) directly from product titles.
💾 Three output formats
CSV for spreadsheets, PostgreSQL-compatible INSERT statements for direct DB import, and JSON cache for immediate use by the poster scripts.
AI Content Generation — 6 Writing Tones
Both poster scripts use a detailed structured prompt to generate content. The AI receives real product data — title, price, discount percentage, rating, order count, and extracted features — and is explicitly instructed not to invent facts. You can choose from six distinct tones, or let the script pick one randomly each run for natural variety.
Viral Twitter
Curiosity-triggering hook that stops the scroll. Opens with a number or provocative question. Built for algorithm reach.
Review Twitter · Pinterest
Honest recommendation style — like a trusted friend who actually bought and used the product. High conversion intent.
Storytelling Twitter
Before-and-after narrative. Builds emotional connection with the product through a relatable transformation arc.
Deals Twitter · Pinterest
Focused on savings, discount percentage, and value-for-money. Targets bargain-hunter psychology directly.
Helpful Pinterest
Informative and practical. Highlights real use cases and functional benefits. Strong fit for home, kitchen, and tools niches.
Inspirational Pinterest
Lifestyle angle that paints a picture of the better life the product enables. High save-rate content on Pinterest.
The Twitter prompt specifies exactly seven tweets — each with a named role: hook, problem, solution, features, value, social proof, and CTA. The AI returns JSON. The script parses it, strips unwanted hashtags, injects one niche hashtag mid-thread, and enforces the 280-character limit per tweet.
Both Groq (cloud-based, fast, free tier available) and Ollama (fully local, privacy-preserving) are supported. Multiple Groq API keys can be entered — the script cycles through them if one hits a rate limit. Ollama users can specify any model installed locally (default: llama3.2).
Browser Automation — Real Sessions, Not APIs
Both posting modules use Playwright with a persistent Chromium session. On the first run, a real browser window opens and asks you to log in manually — handling 2FA, captchas, or any verification step naturally. The session is saved to disk. Every subsequent run reuses the saved session and posts without any interaction.
🐦 Twitter thread composer
Uses clipboard paste (not keyboard typing) to avoid Twitter's hashtag autocomplete dropdown. Handles the "Add tweet" button between posts and detects when the "Post all" button becomes active.
📌 Pinterest pin creation
Downloads the product image to a local cache, uploads it via the file input, fills title, description, and affiliate link, then selects the board and clicks Publish. Falls back gracefully if board selection fails.
🔗 URL shortening
Long AliExpress affiliate URLs are shortened via the TinyURL API before inclusion in tweets — saving characters for the actual content.
📋 Posted history
Every product ID is logged after a successful post. Future runs skip already-posted products automatically. Reset the log file to start fresh.
Dry run mode: Run either poster with --dry-run to preview generated tweets or pin descriptions in the terminal without opening a browser or posting anything. Useful for reviewing AI output before committing.
ZynU Express XPin vs. Paid Alternatives
Commercial tools that cover even a subset of this pipeline typically charge $30–$150 per month. Here's how XPin stacks up:
| Feature | ZynU Express XPin | Paid alternatives |
|---|---|---|
| AliExpress product scraping | ✓ Official API | Separate scraper tool — $15–$50/mo |
| AI tweet thread generation | ✓ Groq or local Ollama | Typefully, Hypefury — $19–$49/mo |
| Twitter auto-posting | ✓ Playwright session | Buffer, Publer — $18–$59/mo |
| Pinterest auto-posting | ✓ Playwright session | Tailwind, Canva Scheduler — $20–$35/mo |
| AI content tones (6 styles) | ✓ Built-in | Extra add-ons or manual prompting |
| Product deduplication | ✓ ID + title matching | Manual or not included |
| CSV + SQL + JSON export | ✓ All three formats | CSV only in most tools |
| Offline / local AI | ✓ Ollama support | ✗ Cloud-only |
| Source code | ✓ Full open source | ✗ Closed SaaS |
| Platform support | ✓ Linux · macOS · Windows | Often Linux/Mac only |
| Monthly cost | ✓ Free | $50–$150+/month combined |
Setup — Running in Under 5 Minutes
ZynU Express XPin ships with two installers: install.py works on all platforms, and install.sh is a Bash alternative for Linux. Both handle Python detection, all dependencies, Playwright Chromium, and a platform-appropriate launcher automatically.
🐧 Linux: installs APT system libs, creates a .desktop entry and desktop shortcut. Alternatively: bash install.sh
🍎 macOS: creates a ~/Applications/ZynU Express XPin.app bundle and a .command file for Finder.
🪟 Windows: installs to %APPDATA%\zynu-express-xpin, adds a Start Menu shortcut, and updates your user PATH.
Terminal-first users: Every module supports CLI flags. Run python scraper.py --help, python poster_twitter.py --help, or python poster_pinterest.py --help for the full argument reference. The GUI is optional.
Requirements
🐍 Python 3.10+
Required for union type hints (str | None) used throughout the codebase. Python 3.11 or 3.12 recommended. The installer auto-detects the correct binary.
🖥 Linux · macOS · Windows
Linux: tested on Mint 21/22, Ubuntu 22.04/24.04, Debian 12.
macOS: tested on Ventura and Sonoma (Apple Silicon + Intel).
Windows: tested on Windows 10 and 11 (64-bit). Run python install.py on any platform.
🛒 AliExpress Affiliate account
Free account at portals.aliexpress.com. You need App Key, App Secret, and a Tracking ID from the API console.
🤖 AI provider (optional)
Groq free tier at console.groq.com or a local Ollama installation. If no AI is configured, the posters fall back to a simple template.
Your affiliate pipeline. Automated.
Scrape AliExpress. Generate content. Post to X and Pinterest. Free, open-source, and entirely yours to run on your own machine. No subscription. No usage limits.