Free · Open Source · Linux · macOS · Windows · Python 3.10+

AliExpress affiliate
on autopilot.

ZynU Express XPin scrapes AliExpress products via the official API, generates AI-written social media content, and auto-posts to Twitter/X and Pinterest — all from a single desktop app. Runs on Linux, macOS, and Windows. No monthly fee, no SaaS lock-in. Full source code. Run it yourself.

Python 3.10+·PySide6 GUI·Playwright·Groq / Ollama AI·Linux · macOS · Windows

ZynU Express XPin v1.0

ZIP · Python · PySide6 · Playwright · ~275 KB · Free forever · Linux · macOS · Windows

Download Free
Watch the Demo

See ZynU Express XPin in Action

Watch a full walkthrough — from product scraping to AI content generation and auto-posting to Twitter/X and Pinterest.


What Is ZynU Express XPin?

Section 1 — Overview

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.

Section 2 — Architecture

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.

🛒
scraper.py
Core engine

Calls the official AliExpress Affiliate API with auto-pagination, rate-limit backoff, and multi-mode deduplication. Outputs CSV, SQL, and JSON.

🐦
poster_twitter.py
X / Twitter automation

Generates a structured 7-tweet thread via Groq or Ollama, then posts it using Playwright with persistent browser sessions.

📌
poster_pinterest.py
Pinterest automation

Downloads product images locally, generates pin descriptions with AI, selects a board, and publishes directly via Playwright.

🖥
gui.py
PySide6 desktop UI

1,900-line dark-themed GUI with tabbed interface, live log output, non-blocking QThread workers, and global settings management.

⚙️
install.py
Cross-platform installer

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.

🐧
install.sh
Linux/Bash installer

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

Section 3 — Pipeline

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.

01
Scrape products from AliExpressscraper.py

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.

02
Generate content with AIAI generation

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.

03
Auto-post via browser automationPlaywright

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.

04
Track posted productsHistory

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

Section 4 — scraper.py

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.

# Run scraper from terminal python scraper.py python scraper.py --keywords "wireless earbuds,smart watch" --limit 20 python scraper.py --min-rating 4.5 --min-orders 500 --max-price 50 # Output files # output/products_20260326_143000.csv # output/products_20260326_143000.sql # output/latest_products.json

AI Content Generation — 6 Writing Tones

Section 5 — AI Copywriting

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

Section 6 — Playwright

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

Section 7 — Comparison

Commercial tools that cover even a subset of this pipeline typically charge $30–$150 per month. Here's how XPin stacks up:

FeatureZynU Express XPinPaid alternatives
AliExpress product scraping✓ Official APISeparate scraper tool — $15–$50/mo
AI tweet thread generation✓ Groq or local OllamaTypefully, Hypefury — $19–$49/mo
Twitter auto-posting✓ Playwright sessionBuffer, Publer — $18–$59/mo
Pinterest auto-posting✓ Playwright sessionTailwind, Canva Scheduler — $20–$35/mo
AI content tones (6 styles)✓ Built-inExtra add-ons or manual prompting
Product deduplication✓ ID + title matchingManual or not included
CSV + SQL + JSON export✓ All three formatsCSV only in most tools
Offline / local AI✓ Ollama support✗ Cloud-only
Source code✓ Full open source✗ Closed SaaS
Platform support✓ Linux · macOS · WindowsOften Linux/Mac only
Monthly cost✓ Free$50–$150+/month combined

Setup — Running in Under 5 Minutes

Section 8 — Installation

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.

STEP 01
Download and extract
Download the ZIP from the button above. Extract it anywhere on your system — your home directory or Desktop works fine.
STEP 02
Run the installer
Open a terminal in the extracted folder and run python install.py — the same command on all platforms. The installer auto-detects your OS and sets everything up. Requires Python 3.10+ and an internet connection.

🐧 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.
STEP 03
Configure your credentials
Open the app and go to the ⚙️ Settings tab. Enter your AliExpress App Key, App Secret, and Tracking ID from portals.aliexpress.com. Add a Groq API key (free at console.groq.com) or configure a local Ollama model.
STEP 04
Add keywords and scrape
Go to the 🛒 Scraper tab, add your product keywords (one per line), set filters, and click ▶ Start Scraping. Products are saved to the output folder automatically.
STEP 05
Post to Twitter or Pinterest
Switch to the 🐦 Twitter or 📌 Pinterest tab. Choose a tone (or leave on random), click ▶ Generate & Post. On the first run, log in to the social platform in the opened browser. All future runs use the saved session.
🔧

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

Section 9 — Prerequisites

🐍 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.