Conversation
…376) ResponseCacheManager.put() only recognized the flat `dict` shape that static-engine responses use for `Response.cookies`. Browser engines (Playwright) populate cookies as a `tuple` of full cookie dicts, so the isinstance(dict) guard fell through to the `else {}` branch and silently discarded every cookie before it ever reached the cache file. Replaying a cached browser-engine response then rebuilt it with cookies={}. Preserve whichever shape the cookies are in instead of collapsing anything non-dict to {}: serialize a tuple as a JSON array and a dict as a JSON object, then restore the tuple shape on read since JSON arrays deserialize back as `list`. Add regression tests covering both the browser-engine (tuple) and static-engine (dict) cookie round-trip through put()/get().
… message (#377) * docs: updating a sponsor URL * Remove unnecessary fetchall() after INSERT OR REPLACE cursor.fetchall() after an INSERT OR REPLACE statement is a no-op since INSERT does not return any rows. This call is dead code. * fix: correct error message in retrieve() abstract method --------- Co-authored-by: Karim shoair <D4Vinci@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A release focused on making your spiders smarter about the websites they crawl
Note
Follow us on X for daily tips and tricks
🚀 New Stuff and quality of life changes
Spiders can now tune their own speed with AutoThrottle. Instead of guessing a
download_delaythat's either too slow or gets you banned, the spider measures how fast each website answers and adjusts the delay of every domain on its own. When a website starts blocking or rate-limiting you, it doubles the delay (or waits exactly what theRetry-Afterheader asks for) until that stops, then speeds back up. Yourdownload_delayand any robots.txtCrawl-delayare still respected as the minimum. (Check the docs)Export your results to CSV and XML, next to the JSON/JSONL exporters you already had. Items that don't all share the same keys are still exported without losing anything, and nested values are written as JSON. (Check the docs)
The MCP server can now require authentication, so you can safely expose it instead of keeping it on your own machine. Any request without the token is rejected, and you can also restrict which hostnames the server answers to. (Check the docs)
scrapling mcp --http --auth-token "$(openssl rand -hex 32)"Browsers now accept CDP URLs over HTTP, not just WebSocket ones. So next to the
wss://endpoints managed browser providers hand out, you can now point any browser fetcher or MCP session at a Chrome you started yourself with--remote-debugging-port=9222.Published Docker images are now tagged with their release version instead of only
latest, so you can pin the exact version you want, by @JanRK in #384.🐛 Bug Fixes
Fixed cached responses losing all their cookies when the response came from a browser engine, which silently broke any session or auth logic relying on them while using the spiders' development mode, by @amitvijapur in #379. (Fixes #376)
Fixed
StealthyFetcherforcing theen-USlocale on every browser instead of following your system's, which made websites see a mismatch between your locale and your IP address and treat you as suspicious, like Google answering with 429s. (Fixes #381)Fixed a misleading error message in the storage system and removed a dead call left after inserts, by @fix2015 in #377.
Performance
get_all_text()is now O(nodes) instead of walking up the ancestors of every single text node, which makes it around 5-6x faster on deeply nested pages, by @yetval in #378.🙏 Special thanks to the community for all the continuous testing and feedback
Big shoutout to our Platinum Sponsors