Skip to content

🕷️ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev

agent: Update skill with the latest changes

Karim shoairb029f9b49114
diff --git a/agent-skill/Scrapling-Skill.zip b/agent-skill/Scrapling-Skill.zip
index 1a8d15b..fb35f39 100644
Binary files a/agent-skill/Scrapling-Skill.zip and b/agent-skill/Scrapling-Skill.zip differ
diff --git a/agent-skill/Scrapling-Skill/SKILL.md b/agent-skill/Scrapling-Skill/SKILL.md
index 89e41d2..c8c97f5 100644
--- a/agent-skill/Scrapling-Skill/SKILL.md
+++ b/agent-skill/Scrapling-Skill/SKILL.md
@@ -396,6 +396,7 @@ You already had a good glimpse of what the library can do. Use the references be
- `references/parsing` - Everything you need for parsing HTML
- `references/fetching` - Everything you need to fetch websites and session persistence
- `references/spiders` - Everything you need to write spiders, proxy rotation, and advanced features. It follows a Scrapy-like format
+- `references/integrations/scrapy.md` - Using Scrapling's parsing API inside existing Scrapy projects through the `scrapling_response` decorator
- `references/migrating_from_beautifulsoup.md` - A quick API comparison between scrapling and Beautifulsoup
- `https://github.com/D4Vinci/Scrapling/tree/main/docs` - Full official docs in Markdown for quick access (use only if current references do not look up-to-date).
diff --git a/agent-skill/Scrapling-Skill/references/fetching/stealthy.md b/agent-skill/Scrapling-Skill/references/fetching/stealthy.md
index ff4b2bf..da7e7e4 100644
--- a/agent-skill/Scrapling-Skill/references/fetching/stealthy.md
+++ b/agent-skill/Scrapling-Skill/references/fetching/stealthy.md
@@ -75,6 +75,7 @@ In session classes, all these arguments can be set globally for the session. Sti
2. The `disable_resources` option made requests ~25% faster in tests for some websites and can help save proxy usage, but be careful with it, as it can cause some websites to never finish loading.
3. The `google_search` argument is enabled by default for all requests, setting the referer to `https://www.google.com/`. If used together with `extra_headers`, it takes priority over the referer set there.
4. If you didn't set a user agent and enabled headless mode, the fetcher will generate a real user agent for the same browser version and use it. If you didn't set a user agent and didn't enable headless mode, the fetcher will use the browser's default user agent, which is the same as in standard browsers in the latest versions.
+5. `init_script` is registered with the browser context, so it runs when pages are created. Stealthy mode uses Patchright's isolated execution context by default; if your `page_action` needs to read globals that the script places on `window`, call `page.evaluate(..., isolated_context=False)` from the action.
## Examples
diff --git a/agent-skill/Scrapling-Skill/references/integrations/scrapy.md b/agent-skill/Scrapling-Skill/references/integrations/scrapy.md
new file mode 100644
index 0000000..da12a4a
--- /dev/null
+++ b/agent-skill/Scrapling-Skill/references/integrations/scrapy.md
@@ -0,0 +1,57 @@
+# Scrapy
+
+If you have an existing Scrapy project, you don't need to rewrite it to enjoy Scrapling's parsing API. The Scrapy integration converts Scrapy responses to Scrapling [Response](../fetching/choosing.md#response-object) objects right inside your spider callbacks, so Scrapy keeps handling the crawling while Scrapling handles the parsing.
+
+**Installation:** This integration works with the default Scrapling installation (`pip install scrapling`), no extras needed. It only requires Scrapy to be installed, which you already have in a Scrapy project.
+
+## Usage
+
+Put the `scrapling_response` decorator on any spider callback, and the `response` argument it receives becomes a Scrapling `Response`:
+
+```python
+import scrapy
+from scrapling.integrations.scrapy import scrapling_response
+
+
+class QuotesSpider(scrapy.Spider):
+ name = "quotes"
+ start_urls = ["https://quotes.toscrape.com"]
+
+ @scrapling_response
+ def parse(self, response): # `response` is now a Scrapling Response
+ first_quote = response.find_by_text("The world as we have created it", partial=True)
+ for quote in [first_quote, *first_quote.find_similar()]:
+ card = quote.parent
+ yield {
+ "text": quote.get_all_text(strip=True),
+ "author": card.find("small", class_="author").text,
+ "tags": [tag.text for tag in card.find_all("a", class_="tag")],
+ }
+ next_page = response.css("li.next a::attr(href)").get()
+ if next_page:
+ yield scrapy.Request(response.urljoin(next_page), callback=self.parse)
+```
+
+The decorator works on all the callback kinds Scrapy supports: regular functions, generators, coroutines, and async generators. The wrapper keeps the callback's kind, name, and docstring, so Scrapy's callback introspection and contracts keep working.
+
+You can also pass [Selector](../parsing/main_classes.md#selector) configuration to the decorator, and it will be forwarded to the generated `Response`:
+
+```python
+ @scrapling_response(adaptive=True, keep_comments=True)
+ def parse_product(self, response):
+ ...
+```
+
+If you have a Scrapy response at hand outside a callback (middlewares, pipelines, and so on), use the converter directly:
+
+```python
+from scrapling.integrations.scrapy import convert_response
+
+scrapling_response = convert_response(scrapy_response, keep_comments=False, keep_cdata=False)
+```
+
+## Notes
+
+- Yield `scrapy.Request(response.urljoin(href))` for the next pages as in the example above. Scrapling's `Response.follow()` method builds requests for [Scrapling's spider system](../spiders/getting-started.md), which Scrapy doesn't understand.
+- The response's `meta` dictionary is shallow-copied, so objects stored by other middlewares stay reachable. For example, with `scrapy-playwright`, the page is still at `response.meta["playwright_page"]`.
+- Cookies are parsed from the raw `Set-Cookie` headers into the response's `cookies` dictionary.
diff --git a/agent-skill/Scrapling-Skill/references/mcp-server.md b/agent-skill/Scrapling-Skill/references/mcp-server.md
index 6aaa014..87bb5bf 100644
--- a/agent-skill/Scrapling-Skill/references/mcp-server.md
+++ b/agent-skill/Scrapling-Skill/references/mcp-server.md
@@ -211,4 +211,33 @@ docker pull pyd4vinci/scrapling
docker run -i --rm pyd4vinci/scrapling mcp
```
+## Custom browser executable
+
+Browser-based tools (`fetch`, `bulk_fetch`, `stealthy_fetch`, `bulk_stealthy_fetch`, and `open_session`) can use a custom Chromium-compatible browser executable instead of the bundled Chromium. This is useful for custom browser builds or lightweight browser engines.
+
+To configure it once for the whole MCP server, pass the executable path when starting the server:
+
+```bash
+scrapling mcp --executable-path "/path/to/chromium"
+```
+
+In a Claude Desktop configuration, add the option to the server arguments:
+
+```json
+{
+ "mcpServers": {
+ "ScraplingServer": {
+ "command": "/Users/<MyUsername>/.venv/bin/scrapling",
+ "args": [
+ "mcp",
+ "--executable-path",
+ "/path/to/chromium"
+ ]
+ }
+ }
+}
+```
+
+You can also set the `SCRAPLING_EXECUTABLE_PATH` environment variable before starting the server. Tool calls can still pass `executable_path` directly when a single request or session needs a different browser executable.
+
The MCP server name when registering with a client is `ScraplingServer`. The command is the path to the `scrapling` binary and the argument is `mcp`.
\ No newline at end of file