v0.6.8b1
Pre-release
Pre-release
Added
- Intelligent browser restart (
BROWSER_RESTART_AFTER_BANS)
The browser engine now restarts Chrome (fresh fingerprint, cookies, and CDP session) only
when it actually needs to — afterBROWSER_RESTART_AFTER_BANS(default5) consecutive
responses are classified as banned or challenged byAntiBotDetector. A single clean
response resets the streak to zero, so a browser sailing through cleanly is never restarted,
no matter how many requests it has served. Replaces the previous fixed-count
BROWSER_RESTART_EVERYrestart, which fired blindly every N requests regardless of whether
anything was actually going wrong.
Implemented via a smallBanStreakTrackerhelper inutils/browser.py.
Fixed
- Browser engine — restart/teardown race on Windows
_reset_browser()now waits for the old event loop's thread to fully stop (_stop_loop())
before starting a new loop and thread. Previously the oldProactorEventLoopcould keep
polling its selector after the replacement loop was already running, surfacing as an
InvalidStateErrorcrash or unretrievedOSErrortask exceptions on Windows.