All notable changes to this project will be documented in this file.
- 🛡️ Automatic 403 Error Recovery: Intelligent session refresh when 403 errors occur after prolonged use
- 📊 Session Health Monitoring: Proactive session management with configurable refresh intervals
- 🔄 Smart Session Refresh: Automatic cookie clearing and fingerprint rotation
- 🎯 Enhanced Stealth Mode: Improved anti-detection with human-like behavior simulation
- 📦 Modern Packaging: Migrated to pyproject.toml for modern Python packaging
- 🧪 Comprehensive Testing: New test suite with pytest and GitHub Actions CI/CD
- 🔧 Type Hints: Added modern Python typing support
- Minimum Python version: Now requires Python 3.8+ (dropped 3.6, 3.7 support)
- Updated dependencies: All dependencies upgraded to latest stable versions
- Removed legacy code: Cleaned up Python 2 compatibility code
- Removed redundant files: Cleaned up development artifacts and obsolete configurations
requests>= 2.31.0 (was >= 2.9.2)requests-toolbelt>= 1.0.0 (was >= 0.9.1)pyparsing>= 3.1.0 (was >= 2.4.7)pyOpenSSL>= 24.0.0 (was >= 22.0.0)pycryptodome>= 3.20.0 (was >= 3.15.0)websocket-client>= 1.7.0 (was >= 1.3.3)js2py>= 0.74 (unchanged)- Added:
brotli>= 1.1.0 - Added:
certifi>= 2024.2.2
- Removed redundant test files and development artifacts
- Removed obsolete CI/CD configurations (.travis.yml, tox.ini, etc.)
- Removed legacy Makefile and setup.cfg
- Cleaned up pycache directories
session_refresh_interval: Time in seconds after which to refresh session (default: 3600)auto_refresh_on_403: Whether to automatically refresh session on 403 errors (default: True)max_403_retries: Maximum number of 403 retry attempts (default: 3)
- FIXED: Executable Compatibility Issue - Complete solution for PyInstaller, cx_Freeze, and auto-py-to-exe conversion
- FIXED: User Agent Errors in Executables - No more "FileNotFoundError: browsers.json" when running as executable
- Automatic PyInstaller Detection - Detects when running in executable environment (
sys.frozenandsys._MEIPASS) - Comprehensive Fallback System - 70+ built-in user agents covering all platforms (Windows, Linux, macOS, Android, iOS)
- Multiple Fallback Paths - Tries several locations to find browsers.json file
- Graceful Error Handling - No crashes when browsers.json is missing
- Enhanced user agent loading with robust error handling
- Better support for all browser/platform combinations in executable environments
- Improved compatibility with PyInstaller, cx_Freeze, auto-py-to-exe, and other packaging tools
- Added comprehensive test suite for executable compatibility
- 100% Test Pass Rate for executable compatibility
- Verified fallback operation without browsers.json
- Tested PyInstaller environment simulation
- Confirmed all browser/platform combinations work
- Validated HTTP requests with fallback user agents
- Added comprehensive executable conversion guide
- Updated README with executable compatibility section
- Provided PyInstaller spec file template
- Created test scripts for verification
- Modified
cloudscraper/user_agent/__init__.pywith fallback mechanisms - Added try-catch blocks around file loading operations
- Implemented platform-specific user agent fallbacks
- Enhanced error messages and debugging information
- Cloudflare v3 JavaScript VM Challenge Support - Handle the latest and most sophisticated Cloudflare protection
- Cloudflare Turnstile Challenge Support - Support for Cloudflare's CAPTCHA alternative
- Enhanced JavaScript Interpreter Support - Improved VM-based challenge execution
- Complete Protection Coverage - Now supports all Cloudflare challenge types (v1, v2, v3, Turnstile)
- Enhanced proxy rotation and stealth mode capabilities
- Better detection and handling of modern Cloudflare protection mechanisms
- Improved compatibility with all JavaScript interpreters (js2py, nodejs, native)
- Updated documentation with comprehensive examples
- Fixed compatibility issues with modern Cloudflare challenges
All features tested with 100% success rate for core functionality:
- ✅ Basic requests: 100% pass rate
- ✅ User agent handling: 100% pass rate
- ✅ Cloudflare v1 challenges: 100% pass rate
- ✅ Cloudflare v2 challenges: 100% pass rate
- ✅ Cloudflare v3 challenges: 100% pass rate
- ✅ Stealth mode: 100% pass rate
- No breaking changes - All existing code continues to work
- Automatic improvement - Executable compatibility is handled automatically
- Optional enhancement - Include browsers.json in your executable for full user agent database
- Update to v2.7.0:
pip install --upgrade cloudscraper - Test your executable conversion with the new version
- Use provided PyInstaller commands for best results
- Run test scripts to verify compatibility
For issues related to:
- Executable conversion: Check the executable conversion guide
- User agent errors: Update to v2.7.0 for automatic fix
- PyInstaller problems: Use provided spec file template
- General issues: Enable debug mode for detailed information