Skip to main content

⚠️ SadCaptcha is looking for devs! To learn more, send a message to @toughdata on telegram.

Shein Captcha Solver API

This project is the SadCaptcha Shein Captcha Solver API client. The purpose is to make integrating SadCaptcha into your Selenium, Playwright, or Async Playwright app as simple as one line of code. Instructions for integrating with Selenium, Playwright, and Async Playwright are described below in their respective sections.

The end goal of this tool is to solve every single shein captcha. Currently we are able to solve icon captcha.

shein Captcha Solver

The icon captcha requires you to click icons on a canvas in the order they appear in the bar.

Requirements

  • Python >= 3.10
  • If using Nodriver - Chromium installed on system. This is the recommended method. Must use chromium, since Google Chrome does not support programmatically loading extensions.
  • If using Selenium - Selenium properly installed and in PATH.
  • If using Playwright - Playwright must be properly installed with playwright install.
  • Stealth plugin - You should use the appropriate stealth plugin for whichever browser automation framework you are using.

Installation

This project can be installed with pip. Just run the following command:

pip install shein-captcha-solver

⚠️ IMPORTANT ⚠️ Must use Chromium for nodriver since Google chrome no longer supports programmatically loading extensions!! Nodriver is the latest advancement in undetected automation technology, and is the recommended method for using SadCaptcha. Import the function make_nodriver_solver This function will create an noddriver instance patched with the shein Captcha Solver chrome extension. The extension will automatically detect and solve the captcha in the background, and there is nothing further you need to do.

from shein_captcha_solver.launcher import make_nodriver_solver

async def main():
    launch_args = ["--headless=chrome"] # If running headless, use this option, or headless=new
    api_key = "YOUR_API_KEY_HERE"
    # NOTE: Keyword arguments passed to make_nodriver_solver() are directly passed to nodriver.start()!
    driver = await make_nodriver_solver(
        api_key,
        browser_args=launch_args,
        browser_executable_path="/usr/bin/chromium-browser" # IMPORTANT! Must use Chromium for nodriver since Google chrome no longer supports programmatically loading extensions!!
    ) # Returns nodriver browser 
    # ... [The rest of your code that accesses shein goes here]
    # Now shein captchas will be automatically solved!

All keyword arguments passed to make_nodriver_solver() are passed directly to nodriver.start().

Selenium Client

Selenium is not reccommended for this since shein has strong bot detection. Use the nodriver package instead.

Import the function make_undetected_chromedriver_solver. This function will create an undetected chromedriver instance patched with the shein Captcha Solver chrome extension. The extension will automatically detect and solve the captcha in the background, and there is nothing further you need to do.

from shein_captcha_solver import make_undetected_chromedriver_solver
from selenium_stealth import stealth
from selenium.webdriver import ChromeOptions
import undetected_chromedriver as uc

chrome_options = ChromeOptions()
# chrome_options.add_argument("--headless=chrome") # If running headless, use this option

api_key = "YOUR_API_KEY_HERE"
driver = make_undetected_chromedriver_solver(api_key, options=options) # Returns uc.Chrome instance
stealth(driver) # Add stealth if needed
# ... [The rest of your code that accesses shein goes here]

# Now shein captchas will be automatically solved!

You may also pass ChromeOptions to make_undetected_chromedriver_solver(), as well as keyword arguments for uc.Chrome().

Playwright Client

Playwright is not reccommended for this since shein has strong bot detection. Use the nodriver package instead.

Import the function make_playwright_solver_context. This function will create a playwright BrowserContext instance patched with the shein Captcha Solver chrome extension. The extension will automatically detect and solve the captcha in the background, and there is nothing further you need to do.

from shein_captcha_solver import make_playwright_solver_context
from playwright.sync_api import sync_playwright

# Need this arg if running headless
launch_args = ["--headless=chrome"] 

api_key = "YOUR_API_KEY_HERE"
with sync_playwright() as p:
    context = make_playwright_solver_context(p, api_key, args=launch_args) # Returns playwright BrowserContext instance
    # ... [The rest of your code that accesses shein goes here]

# Now shein captchas will be automatically solved!

You may also pass keyword args to this function, which will be passed directly to playwright's call to playwright.chromium.launch_persistent_context(). By default, the user data directory is a tempory directory that is deleted at the end of runtime.

Async Playwright Client

Import the function make_async_playwright_solver_context. This function will create an async playwright BrowserContext instance patched with the shein Captcha Solver chrome extension. The extension will automatically detect and solve the captcha in the background, and there is nothing further you need to do.

import asyncio
from playwright.async_api import async_playwright
from shein_captcha_solver import make_async_playwright_solver_context

# Need this arg if running headless
launch_args = ["--headless=chrome"] 

async def main():
    api_key = "YOUR_API_KEY_HERE"
    async with async_playwright() as p:
        context = await make_async_playwright_solver_context(p, api_key, args=launch_args) # Returns playwright BrowserContext instance
        # ... [The rest of your code that accesses shein goes here]

asyncio.run(main())

# Now shein captchas will be automatically solved!

You may also pass keyword args to this function, which will be passed directly to playwright's call to playwright.chromium.launch_persistent_context(). By default, the user data directory is a tempory directory that is deleted at the end of runtime.

Contact

Metadata

Release files for shein-captcha-solver 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shein-captcha-solver 0.2.3
File Size Uploaded Provenance Actions
shein_captcha_solver-0.2.3.tar.gz 24.2 kB Without provenance Details for shein_captcha_solver-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for shein-captcha-solver 0.2.3
File Interpreter ABI Platform Actions
shein_captcha_solver-0.2.3-py3-none-any.whl Python 3 none any Details for shein_captcha_solver-0.2.3-py3-none-any.whl

Total release size: 56.4 kB

Release files / shein_captcha_solver-0.2.3.tar.gz

Download URL shein_captcha_solver-0.2.3.tar.gz
Size 24.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d2398521e238922ccc643432560497b45040e8f45c8e5a42363e820ef58da048
BLAKE2b-256 checksum
How to use checksums
a426d485e92f74f1880679329756bb4dde9929d06e47180e29c4e47740b966b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.8

Release files / shein_captcha_solver-0.2.3-py3-none-any.whl

Download URL shein_captcha_solver-0.2.3-py3-none-any.whl
Size 32.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2cb1c81f435bea6207c08e7abfdd719169b43d3f07e515fc2f3a59f184b00ac8
BLAKE2b-256 checksum
How to use checksums
24c33cb77f5da36fff240f525f0011496473064cd810a3796bab67e0cd0211e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.8

Security for shein-captcha-solver 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page