Release v0.5.1
- AI agents can record a short video of the page and receive it as a sequence of timestamped frames to follow animations, moving controls, and changes a single screenshot can miss
- AI agents can hold a mouse button, move an item or slider, inspect the page while holding it, then adjust and release, with support for left, right, and middle buttons
- AI agents can reuse a logged-in remote browser or start with a separate browser context to choose the right session for the job
- Added RemoteSession and AsyncRemoteSession classes to connect to an existing Chromium browser through an HTTP or WebSocket CDP endpoint, with stealth session features including Cloudflare solving
- RemoteSession and AsyncRemoteSession are available in the interactive shell
- Added new_context option to remote sessions, where new_context=False reuses the browser's default context and login state and leaves existing tabs open on disconnect, while the default new_context=True creates a separate context closed when the session ends
- Added log_file_encoding option to choose the spider log file encoding, with the default None keeping Python's default encoding
- Curl conversion accepts -L and --location while keeping the existing redirect behavior
- Shortened MCP tool descriptions and reduced repeated guidance to spend fewer tokens
- XPath expressions now correctly return values from string(), count(), and boolean(), with empty strings, zero, and false remaining available through the selector API
- Parsing of HTML with no root element, including whitespace-only, comment-only, and doctype-only input
- find_similar(similarity_threshold=0) when the reference has no attributes to compare
- Duplicate robots.txt fetches when concurrent requests reach the same domain
- Temporary-file collisions during concurrent development-cache writes
- Malformed links no longer stop extraction of valid links on the same page
- CSV feeds that use carriage returns as row separators, while preserving line breaks inside quoted fields
- Truncated or damaged gzip feeds in sitemap, XML-feed, and CSV-feed spiders now follow the normal warning-and-skip path
- Browser proxy authentication with percent-encoded usernames and passwords
- Browser cleanup when session setup or context closing fails, releasing owned resources while keeping borrowed remote contexts open
- Shell and HTTP CLI cookie parsing no longer drops browser cookie values with spaces or quotes, or the cookies that follow them
- scrapling extract fetch --ai-targeted now enables ad blocking as documented
From Scrapling
Small version bump, big browser upgrade! This version lets AI agents follow motion and control drag and drop, adds dedicated remote browser sessions, and brings fixes across parsing, spiders, proxies, and the shell 🚀
With this update, we extend the limits of current AI models 🔥
[!WARNING] This release introduces breaking changes to remote browser connections. Connecting to remote browsers now requires a new browser session class. Check the remote-session migration guide before updating.
🚀 New Stuff and quality of life changes
-
AI agents can now follow motion and take finer control of the mouse (Check the docs):
- Watch the page in motion: record a short video and share it as a sequence of frames with timestamps to help the agent understand animations, moving controls, and changes that a single screenshot can miss. Pair this with the existing ability to chain actions!
- Drag, inspect, adjust, and drop: hold a mouse button, move an item or slider, inspect the page while still holding it, then adjust and release. Supports left, right, and middle buttons.
- Reuse a logged-in remote browser or start with a separate browser context, so the agent can choose the right session for the job.
- Spend fewer tokens on tool descriptions with shorter text and less repeated guidance.
-
Dedicated remote browser sessions with control over login reuse.
RemoteSessionandAsyncRemoteSessionconnect to an existing Chromium browser through an HTTP or WebSocket CDP endpoint. They support the usual stealth session features, including Cloudflare solving. Both classes are also available in the interactive shell. (Check the docs)from scrapling.fetchers import RemoteSession with RemoteSession(cdp_url="http://localhost:9222", new_context=False) as session: page = session.fetch("https://example.com")new_context=Falsereuses the browser's existing default context and login state. Its context settings stay in use, and its existing tabs remain open when Scrapling disconnects.- The default,
new_context=True, creates a separate context and closes it when the session ends. Scrapling uses its own tabs in either mode.
-
Choose your spider's log file encoding with
log_file_encoding="utf-8"or another encoding. The default,None, keeps Python's default encoding. (Check the docs)
🐛 Bug Fixes
-
XPath expressions now return their values correctly, including
string(),count(), andboolean(). Empty strings, zero, and false remain available through the usual selector API, by @jayhemnani9910 in #552. -
Fixed parsing of HTML with no root element, including whitespace-only, comment-only, and doctype-only input, by @rushilnimbalker250 in #536.
-
Fixed
find_similar(similarity_threshold=0)when the reference has no attributes to compare, by @Master-Norna in #539. -
Fixed duplicate robots.txt fetches when concurrent requests reach the same domain, by @RayenMlayeh in #538.
-
Fixed temporary-file collisions during concurrent development-cache writes, by @xixihaha-ha in #546.
-
Malformed links no longer stop extraction of valid links on the same page, by @dajiaohuang in #548.
-
Fixed CSV feeds that use carriage returns as row separators, while preserving line breaks inside quoted fields, by @xunguangzlj-cloud in #551.
-
Truncated or damaged gzip feeds now follow the normal warning-and-skip path in sitemap, XML-feed, and CSV-feed spiders, by @cangen185-sudo in #522.
-
Fixed browser proxy authentication with percent-encoded usernames and passwords, by @kevin9327 in #545.
-
Improved browser cleanup when session setup or context closing fails, releasing owned resources while keeping borrowed remote contexts open.
-
Stopped shell and HTTP CLI cookie parsing from dropping browser cookie values with spaces or quotes, including the cookies that follow them, by @waw666waw666 in #541. Fixes #540.
-
Curl conversion now accepts
-Land--location, keeping the existing redirect behavior, by @jayhemnani9910 in #554. -
Fixed
scrapling extract fetch --ai-targetednot enabling ad blocking as documented, by @postoso in #527.
🙏 Special thanks to the community for all the continuous testing and feedback