Undetected Playwright for media buyers — scale Facebook/TikTok/Google ads & Shopify without fingerprint bans. Multilogin CDP.
Project description
Finally, a Playwright wrapper that survives E-commerce anti-bot probes.
Cho media buyer / người chạy ads: BM bị restrict? Shopify hold? Stripe đóng?
pip install undetected-playwright-ecom→stealth-ecom onboard→ Multilogin SAAS50
undetected-playwright-ecom is built for media buyers, dropshippers, and affiliate runners who scale Facebook/TikTok/Google ads and need automation that doesn't leak fingerprints. Connect Playwright to Multilogin X over CDP — survive ad account reviews, Shopify payment holds, and Stripe Radar.
For Media Buyers — Your Search → Our Solution
| You Google this… | This package does… |
|---|---|
facebook ad account disabled |
MediaBuyerToolkit.warmup_account(FACEBOOK) |
run multiple facebook ad accounts |
1 Multilogin profile per account + scale_checklist() |
shopify payments on hold |
ShopifyCheckoutHelper + stealth fingerprint |
multilogin playwright automation |
StealthSession + stealth-ecom doctor |
tiktok ads account suspended |
Platform preset warmup + ban signal scan |
stealth-ecom onboard # see your buyer journey + next steps
stealth-ecom doctor --json # pre-flight before spending ad budget
python examples/facebook_ads_account_warmup.py
Full journey map: docs/ADS_RUNNER_JOURNEY.md
The Problem
Standard Playwright and headless Chrome were never designed for modern e-commerce anti-bot stacks. When you launch a vanilla browser, several signals leak immediately:
| Signal | What happens |
|---|---|
navigator.webdriver === true |
Instantly flags the session as automated |
| Canvas / WebGL fingerprint drift | Mismatches against real device profiles |
| Hardware concurrency & audio context | Exposes VM and datacenter environments |
| Robotic input timing | Behavioral models score clicks and keystrokes as bot traffic |
The result is predictable: merchant accounts frozen, payment gateways declined, and IP ranges burned within minutes. Rotating proxies alone does not fix this — fraud engines correlate TLS, GPU, and behavioral signals together. You need kernel-level fingerprint consistency and human-like interaction patterns.
Stealth Architecture
undetected-playwright-ecom does not spawn detectable local Chromium. It attaches to an already-running stealth profile and routes your automation through it.
flowchart LR
A[Automation Script] --> B[StealthBrowser Core]
B --> C[Multilogin Local API<br/>Port 35000]
C --> D[Target Site]
style A fill:#1e293b,stroke:#38bdf8,color:#f8fafc
style B fill:#0f172a,stroke:#22c55e,color:#f8fafc
style C fill:#0f172a,stroke:#a855f7,color:#f8fafc
style D fill:#1e293b,stroke:#f97316,color:#f8fafc
- Your script calls
StealthBrowser.connect(port=35000). - StealthBrowser Core opens a CDP session via Playwright's
connect_over_cdp. - Multilogin Local API serves a hardware-bound browser profile with spoofed fingerprints.
- Target Site sees a consistent, human-grade session — not a datacenter bot.
Features
| Module | Purpose |
|---|---|
StealthSession |
All-in-one facade — connect, navigate, audit, cookies |
AsyncStealthBrowser |
Async CDP connector for concurrent pipelines |
StealthBrowser |
Sync CDP connector for Multilogin X stealth profiles |
BanDetector |
Detect Cloudflare / Datadome / Shopify hard blocks |
ShopifyCheckoutHelper |
Human-type checkout fields with auto selector map |
HumanEmulator |
Behavioral typing, scrolling, and Bézier clicking |
ChallengeWatcher |
Wait for Turnstile tokens / Datadome cookies |
SessionManager |
Proxy validation and cookie inject/extract |
FingerprintAuditor |
Programmatic WebGL + webdriver stealth scoring |
retry_on_failure |
Exponential-backoff retry decorator |
StealthLogger |
Color-coded enterprise telemetry |
stealth-ecom niches |
49+ buyer niches with SEO keywords & Multilogin CTAs |
LongTailEngine |
700+ long-tail keywords (EN + VI) — search, --tag, bulk expand, CSV |
LongTailContentGenerator |
Full SEO articles + FAQ for long-tail queries |
ProfilePool |
Scale N Multilogin profiles (multi CDP port) |
StealthConfig |
JSON config for profiles, proxies, cookies |
AffiliateContentGenerator |
Auto-generate Telegram/SEO affiliate posts |
HealthReporter |
Fleet audit → HTML dashboard + JSON |
HealthHistoryStore |
Track health trends over days (JSONL) |
AlertHub |
Fan-out alerts to Telegram + Discord + Slack |
FleetWatchdog |
Periodic monitoring with cron schedule support |
CronSchedule |
0 */6 * * * style UTC scheduling |
ProfileRotator |
Auto-quarantine + rotate to backup_port on ban |
FleetHealer |
Audit → quarantine → alert in one cycle |
DashboardServer |
Live HTTP dashboard + POST /api/webhook/ban |
ProxyPool |
Rotate & validate residential proxy lists |
MultiloginLauncher |
Start/stop MLX profiles via Launcher API |
FleetOrchestrator |
MLX launch → proxy assign → heal (one command) |
FleetRiskScorer |
Spend risk score — safe to scale yes/no |
ProfileTemplate |
Facebook/TikTok/Shopify fleet config presets |
StealthRunbook |
Declarative cron automation (JSON) |
RecoveryPlaybook |
Step-by-step ban recovery per platform |
BudgetGuard |
Daily spend caps + risk gate |
SnapshotDiff |
Compare health snapshots over time |
FleetWorkspace |
Multi-client agency fleet audit |
EmailNotifier |
SMTP alerts (added to AlertHub) |
IncidentLog |
Unified JSONL timeline (ban, heal, drift…) |
BaselineStore |
Fingerprint drift detection per profile |
UnifiedDashboard |
Ops HTML — risk + budget + quarantine + incidents |
OpsNotifier |
PagerDuty / n8n webhook (OPS_WEBHOOK_URL) |
GeoValidator |
Proxy country vs target_geo in config |
SLOTracker |
30-day fleet health SLO from history |
ParallelHealthReporter |
Fast audit for 10+ profiles |
StealthSecrets |
.env loader + integration status |
RulesEngine |
JSON automation — ban → heal → notify |
StealthDaemon |
24/7 background fleet service |
PrometheusExporter |
/metrics for Grafana |
FleetBackup |
ZIP backup/restore fleet state |
CampaignTracker |
Track campaigns per MLX profile |
stealth-ecom CLI |
keywords, content --longtail, daemon, rules, backup |
Industry Niches — Every Multilogin Buyer Persona
undetected-playwright-ecom targets every search intent that leads to antidetect browser adoption. Run stealth-ecom niches to list all clusters.
E-Commerce & Payments
| Niche | Search keywords | Example |
|---|---|---|
| Shopify / Dropshipping | shopify checkout automation, stripe radar bypass |
shopify_checkout_automation.py |
| Amazon Seller | amazon seller automation, seller central bot |
amazon_seller_automation.py |
| eBay / Walmart | ebay automation playwright, marketplace multi account |
— |
WAF / Anti-Bot Bypass
| Niche | Search keywords | Example |
|---|---|---|
| Cloudflare Turnstile | cloudflare turnstile bypass python, playwright cloudflare |
bypass_cloudflare_turnstile.py |
| Datadome | datadome bypass python, datadome playwright |
datadome_bypass_playwright.py |
| PerimeterX / Kasada | perimeterx bypass, kasada python |
— |
Hype & Limited Drops
| Niche | Search keywords | Example |
|---|---|---|
| Sneaker bots | sneaker bot python, snkrs bot, shopify drop bot |
sneaker_drop_monitor.py |
| Ticket drops | ticketmaster bot, ticket bot playwright |
— |
| NFT / Crypto mint | nft mint bot, airdrop farmer python |
crypto_airdrop_farmer.py |
Social Media Automation
| Niche | Search keywords | Example |
|---|---|---|
instagram automation playwright, insta multi account |
instagram_stealth_login.py |
|
| TikTok | tiktok bot python, tiktok account warmup |
tiktok_account_warmup.py |
linkedin automation, linkedin outreach bot |
linkedin_outreach_automation.py |
|
| Facebook / X | facebook ads automation, twitter bot python |
— |
Scraping & Data
| Niche | Search keywords | Example |
|---|---|---|
| Web scraping | playwright scraping stealth, undetected scraper |
web_scraping_stealth.py |
| Price monitoring | price monitoring bot, competitor scraper |
— |
| Google SERP / SEO | serp checker python, google scraping stealth |
— |
Marketing & Growth
| Niche | Search keywords | Promo |
|---|---|---|
| Affiliate / CPA | cpa funnel automation, affiliate bot python |
SAAS50 |
| Account farming | account farming python, multi account browser |
SAAS50 + MIN50 |
| SMS / OTP verify | sms verification bot, otp automation |
MIN50 |
Full playbook: docs/NICHE_PLAYBOOK.md
stealth-ecom niches --search shopify
stealth-ecom niches --id cloudflare-turnstile
Behavioral Stealth — Real Value, Not Theater
Anti-bot systems no longer rely on IP alone. They model how users interact. HumanEmulator provides genuine, measurable value by replacing robotic input with statistically human patterns:
human_type(selector, text)
- Types character-by-character with 30–150 ms randomized inter-key delays
- Simulates QWERTY-adjacent typos with pause-and-backspace correction
- Reduces behavioral bot-score triggers on login forms, search bars, and checkout fields
human_click(selector)
- Approaches the target along a cubic Bézier curve with jittered control points
- Uses 18–42 micro-steps with variable timing before clicking
- Clicks with slight offset from element center to avoid bot centroid detection
human_scroll()
- Scrolls in irregular pixel chunks (80–320 px) with smooth motion
- Pauses 1–3 seconds between scroll steps to mimic content reading
- Lowers session anomaly scores on long product pages and policy screens
from undetected_playwright_ecom import StealthBrowser, HumanEmulator
browser = StealthBrowser()
session = browser.connect(port=35000)
page = session.contexts[0].pages[0]
human = HumanEmulator(page)
human.human_scroll()
human.human_type("input[name='email']", "buyer@example.com")
Behavioral emulation complements fingerprint stealth — it does not replace it. Always run inside a Multilogin X profile.
Installation
pip install undetected-playwright-ecom
playwright install chromium
Playwright's bundled Chromium is only required for the CDP client library. Stealth sessions must execute inside Multilogin X.
Quick Start
One-liner facade (recommended)
from undetected_playwright_ecom import StealthSession
with StealthSession(port=35000) as session:
session.navigate("https://example-shop.com", audit=True, scroll=True)
session.ban_detector.raise_if_blocked()
session.human.human_click("button.add-to-cart")
session.shopify.detect_checkout_ready()
session.watcher.wait_for_turnstile(timeout_s=30)
CLI
pip install undetected-playwright-ecom
stealth-ecom config-init --profiles 5
stealth-ecom scale --config stealth_config.json
stealth-ecom report --notify # HTML + alert all channels
stealth-ecom daemon --cron "0 */6 * * *" # 24/7 fleet ops + dashboard
stealth-ecom rules --init # rules.json automation
stealth-ecom backup --output backups/fleet.zip
stealth-ecom campaigns --add c1:fb-1:facebook:US-Dropship
stealth-ecom content --fb-ads --lang vi # Facebook ad copy
stealth-ecom content --query facebook --lang vi
stealth-ecom keywords --list # 700+ keywords across 49 niches
stealth-ecom keywords --tags # keyword count per tag (ads, waf…)
stealth-ecom keywords --tag vietnam --lang vi # VN media buyer long-tail
stealth-ecom keywords --tag native # Taboola/Outbrain phrases
stealth-ecom keywords --search "facebook ad account disabled"
stealth-ecom keywords --long # phrases with 10+ words only
stealth-ecom keywords --bulk media-buyer-scale # expand all seeds for niche
stealth-ecom keywords --expand "shopify payments on hold" --lang vi
stealth-ecom keywords --cluster media-buyer-scale
stealth-ecom keywords --panic --lang vi # panic-intent (BM restrict, Stripe ban…)
stealth-ecom keywords --intent comparison --min-words 8
stealth-ecom keywords --export keywords.csv
stealth-ecom content --longtail "how to run multiple facebook ad accounts without getting banned"
Low-level API
from undetected_playwright_ecom import StealthBrowser, StealthLogger
log = StealthLogger(component="Checkout")
try:
with StealthBrowser() as stealth:
stealth.connect(port=35000)
page = stealth.get_page()
page.goto("https://example-shop.com")
log.success("Stealth session active")
except Exception as exc:
log.critical(f"Session failed: {exc}")
Verify your setup before going live
python examples/verify_stealth_score.py
Expected output when properly configured:
[SUCCESS] 🛡️ Setup Secure. Enterprise Stealth Active.
Enterprise Bypassing
For large-scale dropshipping, fingerprint spoofing at the kernel level is mandatory. We recommend Multilogin X.
- 50% OFF Multilogin X — use code
SAAS50 - 50% OFF Cloud Phone SMS (OTP / 2FA flows) — use code
MIN50 - Join the automation hub for exclusive scripts, setup guides, and live support:
https://t.me/Multilogin_Scripts_Bot
| Step | Action |
|---|---|
| 1 | Install Multilogin X and create a stealth browser profile |
| 2 | Start the profile with CDP enabled on port 35000 |
| 3 | Run verify_stealth_score.py to confirm navigator.webdriver is false |
| 4 | Deploy your automation with StealthBrowser + HumanEmulator |
API Reference
from undetected_playwright_ecom import (
StealthBrowser,
HumanEmulator,
SessionManager,
StealthLogger,
StealthCoreNotDetectedError,
FingerprintLeakWarning,
ProxyLeakSecurityError,
)
| Class / Symbol | Description |
|---|---|
StealthBrowser.connect(port=35000) |
Attach to Multilogin X via CDP |
HumanEmulator(page) |
Human-like typing and scrolling |
SessionManager(context) |
Proxy validation, cookie inject/extract |
StealthLogger |
[INFO] / [SUCCESS] / [WARNING] / [CRITICAL] telemetry |
StealthCoreNotDetectedError |
CDP endpoint unreachable |
ProxyLeakSecurityError |
Proxy failed or leaked host IP |
FingerprintLeakWarning |
Suspected hardware fingerprint exposure |
Examples
| Script | Description |
|---|---|
examples/bypass_cloudflare_turnstile.py |
Cloudflare Turnstile bypass |
examples/datadome_bypass_playwright.py |
Datadome bypass demo |
examples/shopify_checkout_automation.py |
Shopify checkout human_type |
examples/amazon_seller_automation.py |
Amazon Seller Central stealth |
examples/sneaker_drop_monitor.py |
Sneaker / hype drop monitor |
examples/instagram_stealth_login.py |
Instagram multi-account login |
examples/tiktok_account_warmup.py |
TikTok warmup scroll patterns |
examples/linkedin_outreach_automation.py |
LinkedIn outreach stealth |
examples/crypto_airdrop_farmer.py |
Crypto airdrop / sybil isolation |
examples/web_scraping_stealth.py |
Undetected web scraping |
examples/verify_stealth_score.py |
Pre-flight fingerprint probe |
examples/facebook_ads_account_warmup.py |
Media buyer FB warmup + health check |
examples/media_buyer_scale_playbook.py |
Multi-platform scale playbook |
examples/full_ecom_workflow.py |
End-to-end StealthSession demo |
Requirements
| Component | Required |
|---|---|
| Python 3.8+ (3.10 recommended) | Yes |
| Multilogin X Stealth Core (CDP port 35000) | Yes |
playwright, requests |
Yes (installed automatically) |
| Standard headless Chrome alone | No |
Publishing to PyPI
GitHub Actions (recommended)
- Push repo to GitHub
- Add secret
PYPI_API_TOKENin Settings → Secrets → Actions - Create a release tag:
git tag v2.8.0
git push origin v2.8.0
Or trigger manually: Actions → Publish to PyPI → Run workflow (type publish).
Local publish (Windows)
$env:PYPI_API_TOKEN = "pypi-YOUR_TOKEN"
.\scripts\publish.ps1
Contributing
Pull requests and issue reports are welcome. Please run examples/verify_stealth_score.py against a Multilogin profile before submitting stealth-related changes.
License
MIT © Enterprise Automation Infra
Support the Project
If this library saved your checkout flow from a ban wave, star this repo to support the project and help other developers discover production-grade e-commerce automation.
For setup walkthroughs, discount codes, and the latest bypass playbooks, join the hub:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file undetected_playwright_ecom-2.8.0.tar.gz.
File metadata
- Download URL: undetected_playwright_ecom-2.8.0.tar.gz
- Upload date:
- Size: 140.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe12093a480b79c9e6bb62ab9365a8e4f5c639d0bebd622ecb06a7dfc9a85a09
|
|
| MD5 |
6d0ad1217d7990dde19ec817934e3a8d
|
|
| BLAKE2b-256 |
49ce123d746ee8498fcd5874a3cd24d798e3f12245808a0552c55ccb86d788e2
|
File details
Details for the file undetected_playwright_ecom-2.8.0-py3-none-any.whl.
File metadata
- Download URL: undetected_playwright_ecom-2.8.0-py3-none-any.whl
- Upload date:
- Size: 154.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d87c78dea91c69bcd2e33affca6acc25d2f6a5d6af0b497655b2235a45ecd5b
|
|
| MD5 |
8bb54a2781e4d56078e03bd8df438359
|
|
| BLAKE2b-256 |
7c92225dec19ff0065b2186ccf41d250da65a6400fd2b9a392690bf9be11680b
|