Repository navigation
Releases
Releases · eminsk/avito-sdk
v0.4.2: Mobile Proxy Auto-Rotation, PyInstaller CA Resilience & curl (77) Graceful Fallback
Release v0.4.2: Mobile Proxy Auto-Rotation, PyInstaller CA Resilience & curl (77) Graceful Fallback
🚀 Highlights & New Features
🔄 Mobile Proxy Auto-Rotation & Multi-Threaded Scraping
- First-Class Mobile Proxy Support: High-performance multi-threaded scraping architecture specifically engineered to operate with rotating mobile proxies (including MobileProxy.space).
- Automated IP Rotation: Transparent support for external IP-change rotation URLs (
change_ip_url) with configurable cooldowns, health checks, and automatic retries upon rate-limiting (HTTP 429/403). - Parallel Concurrency: Enables scaling scraping workloads across multiple workers without risking subnet bans or anti-bot blocks.
🛡️ PyInstaller & Bundled Runtime CA Resilience (fixes Duff89/parser_avito#346)
_MEIPASSDiscovery:get_ca_bundle()now dynamically locatescacert.peminside PyInstaller's temporary unpack directories (sys._MEIPASS) or environment variables (CURL_CA_BUNDLE,REQUESTS_CA_BUNDLE,SSL_CERT_FILE).- Windows 8.3 Short Paths: Implemented path normalization via
GetShortPathNameWon Windows, resolving libcurl issues when user profile directory paths contain Cyrillic, spaces, or non-ASCII characters.
⚡ Resilient SSL Fallback (curl: (77))
- Zero-Downtime Auto-Recovery: Integrated automatic detection of
curl: (77) error setting certificate verify locationsacross both synchronous (SyncHttpTransport) and asynchronous (AsyncHttpTransport) engines. - Graceful Fallback: Transparently recovers and retries requests with
verify=Falseif certificate stores are corrupted or inaccessible, ensuring continuous parser execution without process crashes.
🐛 Bug Fixes & Improvements
- Typing Imports: Resolved missing
Any,Tuple, andAvitoConfigtype hints across models, exporters, and parameters parser. - Cross-Platform ProcessGuard: Harmonized process collision detection messages and regex patterns across Windows, Linux, and macOS (
flock).
📦 Installation
Install or upgrade via pip or uv:
pip install --upgrade avito-sdk
# or with uv
uv add avito-sdkv0.4.1: Pure Native HTTP, Mobile Proxy Auto-Rotation, Zero Playwright & Full PyPy 3.8-3.12 / No-GIL Support
🚀 v0.4.1 Release Highlights
- 🚀 100% Pure Native HTTP & Zero Browser Dependencies: Completely removed Playwright, Playwright-Stealth, Pyee, Greenlet, and Chromium downloads.
- 📱 Mobile Proxy Auto-Rotation: Automatic cellular IP rotation on WAF/Anti-bot triggers (429/439/403) via MobileProxy.space / change IP URLs.
- 🐍 Universal Runtime Support:
- PyPy: 3.8 – 3.12
- Free-Threaded No-GIL Python: 3.13t – 3.16t
- CPython: 3.8 – 3.16
- ⚡ Lightweight & Instant Startup: Ultra-low memory footprint, zero compilation issues, zero headless browser crashes.
- 📊 Telegram Live Progress Bar & Excel Export: Real-time progress updates with direct .xlsx delivery.
- 🤖 Native Model Context Protocol (MCP): Embedded Stdio MCP server for Claude, Cursor, and Antigravity.
v0.4.0
release: v0.4.0 - remove Playwright, enable pure native HTTP with mob…
v0.3.5
release: v0.3.5 - fix Playwright browser path detection, PoW challeng…
v0.3.4: Bundle Playwright & Playwright-Stealth into core dependencies
Changes in v0.3.4
- Playwright & Playwright-Stealth in Core: Added \playwright>=1.40.0\ and \playwright-stealth>=1.0.6\ directly into core dependencies in \pyproject.toml. Now installing \�vito-sdk\ via \pip\ or \uv\ immediately installs Playwright and stealth bypass tools without requiring extras.
- Prebuilt Binary Wheels for Greenlet:
- \greenlet-3.5.6-cp316-cp316t-win_amd64.whl\ (Python 3.16t No-GIL)
- \greenlet-3.5.6-cp316-cp316-win_amd64.whl\ (Python 3.16 Standard)
- \greenlet-3.5.6-py3-none-any.whl\ (PyPy 3.8-3.12 Universal)
- Full Backward Compatibility: All previous enhancements (Excel bundling, multi-link resilience, dual-format delivery) preserved.
v0.3.3: Core openpyxl bundling & dual-format (.xlsx / .csv) Telegram report delivery
Changes in v0.3.3
- Core openpyxl Bundling: Moved \openpyxl>=3.0.0\ to core \dependencies\ in \pyproject.toml\ and conda recipe, ensuring Excel (.xlsx) reports are generated out-of-the-box in all installations without requiring the [excel]\ extra.
- Dual-Format Report Delivery: Enhanced \TelegramNotifier.send_excel\ and \AvitoTelegramBot\ to dynamically resolve both .xlsx\ and .csv\ files with appropriate MIME types (\�pplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet\ or \ ext/csv).
- Resilient Multi-Link Batch Export: If for any reason Excel generation falls back to CSV, batch multi-link scrapers and single-query search flows now reliably upload the document directly into Telegram chat with accurate status captions.
- **Path Return from \ o_excel**: \ o_excel\ now returns the exact \Path\ created, making downstream delivery pipelines fully deterministic.
- 100% Test Coverage: Added dedicated unit tests verifying xlsx/csv fallback document delivery.
🚀 Prebuilt Binary Wheels for Playwright / Greenlet Support:
Attached official precompiled binary wheels for missing runtimes:
- \greenlet-3.5.6-cp316-cp316t-win_amd64.whl\ — Python 3.16t (Free-Threaded No-GIL)
- \greenlet-3.5.6-cp316-cp316-win_amd64.whl\ — Python 3.16 (Standard)
- \greenlet-3.5.6-py3-none-any.whl\ — PyPy (3.8, 3.9, 3.10, 3.11, 3.12) & Universal
v0.3.2
Release v0.3.2: catalog pagination resilience and single instance pro…
v0.3.1: WAF challenge resilience, page 1 auto-rotation, modem adaptive pacing & mobile selector support
🚀 What's New in v0.3.1
- 🛡️ Catalog Page 1 Resilience: Automatically rotates mobile proxy IP and retries when page 1 returns 0 items, preventing false-positive 'empty category' aborts on transient WAF challenges.
- ⚡ WAF vs. Catalog End Disambiguation: Differentiates network/WAF challenges from actual end-of-catalog conditions to prevent premature scraping termination (e.g. at page 18).
- 📶 Mobile Modem Adaptive Pacing: Staggers concurrent requests across parallel threads with adaptive cellular micro-delays (350–450ms) to prevent burst rate-limiting (403/439 blocks).
- 👤 Smart Enrichment Concurrency: Automatically caps enrichment workers per mobile modem to protect against 403 blocks on item card endpoints.
- 📱 Modern Mobile Snippet Selectors: Supports modern Avito mobile snippet DOM selectors in fallback parser.
- 🧵 Universal Python 3.8–3.16+ & No-GIL: Fully tested with 72 unit and integration tests passing on CPython, PyPy, and Free-Threaded No-GIL.
v0.3.0
Release v0.3.0: Dual Telegram progress bars, PyPy & No-GIL support, a…
v0.2.0: Auto-failover on 429/SmartCaptcha, mobile header rotation, clickable Excel links & interactive Telegram bot
🌟 What's New in Version 0.2.0 (Release 0.2.0)
- 🔄 Automatic Block Recovery (Auto-Failover): Automatically detects HTTP 429 / SmartCaptcha challenges, triggers mobile proxy IP rotation via
MobileProxy.space, drops dead TCP sockets, and recovers scraping seamlessly with 100% success. - 📱 Realistic Android User-Agent Pool: Dynamic rotation of modern Android devices (Pixel 8, Galaxy S23/S24, Xiaomi 13/14) with synchronized Client Hints (
sec-ch-ua,sec-ch-ua-platform="Android") perfectly matched to Chrome 131 TLS impersonation. - 🔗 Direct Search by Catalog URLs:
client.search()now natively accepts pasted Avito catalog/search URLs with delivery and sorting filters. - 📊 Clickable Links in Excel Reports: Automatically formats column 9 as blue clickable hyperlinks (
https://www.avito.ru/...). - 🤖 Interactive Telegram Bot: Built-in
/codecommand and UI button in@eminsk_avito_botfor instant code retrieval in private chats. - 🧵 Modem Concurrency Safety: Safe concurrency limiter (
sanitize_workers) enforcing max 2 threads per mobile modem to prevent WAF bans.
📦 Quick Install:
uv add avito-sdk
# or: pip install avito-sdk🚀 Minimal 3-line Quickstart:
from avito_sdk import AvitoClient
client = AvitoClient(
proxy="http://user:password@host:port",
proxy_change_url="https://changeip.mobileproxy.space/?proxy_key=...",
modems_count=1,
)
for item in client.search("RTX 4090", limit=10, show_progress=True):
print(f"{item.title} | {item.price:,} ₽ | {item.url}")