scrapling 0.5__tar.gz → 0.5.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. {scrapling-0.5/scrapling.egg-info → scrapling-0.5.2}/PKG-INFO +57 -29
  2. {scrapling-0.5 → scrapling-0.5.2}/README.md +45 -17
  3. {scrapling-0.5 → scrapling-0.5.2}/pyproject.toml +12 -12
  4. {scrapling-0.5 → scrapling-0.5.2}/scrapling/__init__.py +1 -1
  5. {scrapling-0.5 → scrapling-0.5.2}/scrapling/cli.py +5 -24
  6. {scrapling-0.5 → scrapling-0.5.2}/scrapling/core/_shell_signatures.py +0 -2
  7. {scrapling-0.5 → scrapling-0.5.2}/scrapling/core/ai/_browser_actions.py +16 -0
  8. {scrapling-0.5 → scrapling-0.5.2}/scrapling/core/ai/server.py +114 -52
  9. {scrapling-0.5 → scrapling-0.5.2}/scrapling/core/shell.py +8 -0
  10. {scrapling-0.5 → scrapling-0.5.2}/scrapling/core/utils/_shell.py +20 -9
  11. {scrapling-0.5 → scrapling-0.5.2}/scrapling/engines/_browsers/_base.py +69 -87
  12. scrapling-0.5.2/scrapling/engines/_browsers/_remote.py +79 -0
  13. {scrapling-0.5 → scrapling-0.5.2}/scrapling/engines/_browsers/_stealth.py +31 -41
  14. {scrapling-0.5 → scrapling-0.5.2}/scrapling/engines/_browsers/_types.py +16 -8
  15. {scrapling-0.5 → scrapling-0.5.2}/scrapling/engines/_browsers/_validators.py +20 -12
  16. {scrapling-0.5 → scrapling-0.5.2}/scrapling/engines/static.py +10 -0
  17. {scrapling-0.5 → scrapling-0.5.2}/scrapling/engines/toolbelt/custom.py +15 -32
  18. {scrapling-0.5 → scrapling-0.5.2}/scrapling/engines/toolbelt/navigation.py +7 -4
  19. {scrapling-0.5 → scrapling-0.5.2}/scrapling/fetchers/__init__.py +5 -0
  20. {scrapling-0.5 → scrapling-0.5.2}/scrapling/fetchers/stealth_chrome.py +0 -2
  21. {scrapling-0.5 → scrapling-0.5.2}/scrapling/parser.py +35 -11
  22. {scrapling-0.5 → scrapling-0.5.2}/scrapling/spiders/cache.py +2 -1
  23. {scrapling-0.5 → scrapling-0.5.2}/scrapling/spiders/links.py +8 -5
  24. {scrapling-0.5 → scrapling-0.5.2}/scrapling/spiders/request.py +29 -23
  25. {scrapling-0.5 → scrapling-0.5.2}/scrapling/spiders/robotstxt.py +10 -2
  26. {scrapling-0.5 → scrapling-0.5.2}/scrapling/spiders/spider.py +2 -1
  27. scrapling-0.5.2/scrapling/spiders/templates/_utils.py +32 -0
  28. {scrapling-0.5 → scrapling-0.5.2}/scrapling/spiders/templates/feed.py +3 -1
  29. {scrapling-0.5 → scrapling-0.5.2}/scrapling/spiders/throttle.py +5 -1
  30. {scrapling-0.5 → scrapling-0.5.2/scrapling.egg-info}/PKG-INFO +57 -29
  31. {scrapling-0.5 → scrapling-0.5.2}/scrapling.egg-info/SOURCES.txt +3 -1
  32. {scrapling-0.5 → scrapling-0.5.2}/scrapling.egg-info/requires.txt +11 -11
  33. {scrapling-0.5 → scrapling-0.5.2}/setup.cfg +1 -1
  34. scrapling-0.5.2/tests/test_url_scheme_validation.py +28 -0
  35. scrapling-0.5/scrapling/spiders/templates/_utils.py +0 -24
  36. {scrapling-0.5 → scrapling-0.5.2}/LICENSE +0 -0
  37. {scrapling-0.5 → scrapling-0.5.2}/MANIFEST.in +0 -0
  38. {scrapling-0.5 → scrapling-0.5.2}/scrapling/core/__init__.py +0 -0
  39. {scrapling-0.5 → scrapling-0.5.2}/scrapling/core/_types.py +0 -0
  40. {scrapling-0.5 → scrapling-0.5.2}/scrapling/core/ai/__init__.py +0 -0
  41. {scrapling-0.5 → scrapling-0.5.2}/scrapling/core/ai/_network_formatting.py +0 -0
  42. {scrapling-0.5 → scrapling-0.5.2}/scrapling/core/ai/_snapshot_search.py +0 -0
  43. {scrapling-0.5 → scrapling-0.5.2}/scrapling/core/custom_types.py +0 -0
  44. {scrapling-0.5 → scrapling-0.5.2}/scrapling/core/mixins.py +0 -0
  45. {scrapling-0.5 → scrapling-0.5.2}/scrapling/core/storage.py +0 -0
  46. {scrapling-0.5 → scrapling-0.5.2}/scrapling/core/translator.py +0 -0
  47. {scrapling-0.5 → scrapling-0.5.2}/scrapling/core/utils/__init__.py +0 -0
  48. {scrapling-0.5 → scrapling-0.5.2}/scrapling/core/utils/_utils.py +0 -0
  49. {scrapling-0.5 → scrapling-0.5.2}/scrapling/engines/__init__.py +0 -0
  50. {scrapling-0.5 → scrapling-0.5.2}/scrapling/engines/_browsers/__init__.py +0 -0
  51. {scrapling-0.5 → scrapling-0.5.2}/scrapling/engines/_browsers/_config_tools.py +0 -0
  52. {scrapling-0.5 → scrapling-0.5.2}/scrapling/engines/_browsers/_network.py +0 -0
  53. {scrapling-0.5 → scrapling-0.5.2}/scrapling/engines/_browsers/_page.py +0 -0
  54. {scrapling-0.5 → scrapling-0.5.2}/scrapling/engines/constants.py +0 -0
  55. {scrapling-0.5 → scrapling-0.5.2}/scrapling/engines/toolbelt/__init__.py +0 -0
  56. {scrapling-0.5 → scrapling-0.5.2}/scrapling/engines/toolbelt/ad_domains.py +0 -0
  57. {scrapling-0.5 → scrapling-0.5.2}/scrapling/engines/toolbelt/convertor.py +0 -0
  58. {scrapling-0.5 → scrapling-0.5.2}/scrapling/engines/toolbelt/fingerprints.py +0 -0
  59. {scrapling-0.5 → scrapling-0.5.2}/scrapling/engines/toolbelt/proxy_rotation.py +0 -0
  60. {scrapling-0.5 → scrapling-0.5.2}/scrapling/fetchers/requests.py +0 -0
  61. {scrapling-0.5 → scrapling-0.5.2}/scrapling/integrations/__init__.py +0 -0
  62. {scrapling-0.5 → scrapling-0.5.2}/scrapling/integrations/scrapy.py +0 -0
  63. {scrapling-0.5 → scrapling-0.5.2}/scrapling/py.typed +0 -0
  64. {scrapling-0.5 → scrapling-0.5.2}/scrapling/spiders/__init__.py +0 -0
  65. {scrapling-0.5 → scrapling-0.5.2}/scrapling/spiders/checkpoint.py +0 -0
  66. {scrapling-0.5 → scrapling-0.5.2}/scrapling/spiders/engine.py +0 -0
  67. {scrapling-0.5 → scrapling-0.5.2}/scrapling/spiders/result.py +0 -0
  68. {scrapling-0.5 → scrapling-0.5.2}/scrapling/spiders/scheduler.py +0 -0
  69. {scrapling-0.5 → scrapling-0.5.2}/scrapling/spiders/session.py +0 -0
  70. {scrapling-0.5 → scrapling-0.5.2}/scrapling/spiders/templates/__init__.py +0 -0
  71. {scrapling-0.5 → scrapling-0.5.2}/scrapling/spiders/templates/crawler.py +0 -0
  72. {scrapling-0.5 → scrapling-0.5.2}/scrapling/spiders/templates/shopify.py +0 -0
  73. {scrapling-0.5 → scrapling-0.5.2}/scrapling/spiders/templates/site_to_markdown.py +0 -0
  74. {scrapling-0.5 → scrapling-0.5.2}/scrapling/spiders/templates/sitemap.py +0 -0
  75. {scrapling-0.5 → scrapling-0.5.2}/scrapling.egg-info/dependency_links.txt +0 -0
  76. {scrapling-0.5 → scrapling-0.5.2}/scrapling.egg-info/entry_points.txt +0 -0
  77. {scrapling-0.5 → scrapling-0.5.2}/scrapling.egg-info/not-zip-safe +0 -0
  78. {scrapling-0.5 → scrapling-0.5.2}/scrapling.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scrapling
3
- Version: 0.5
3
+ Version: 0.5.2
4
4
  Summary: Scrapling is an undetectable, powerful, flexible, high-performance Python framework that makes Web Scraping easy and effortless as it should be!
5
5
  Home-page: https://github.com/D4Vinci/Scrapling
6
6
  Author: Karim Shoair
@@ -68,32 +68,32 @@ Classifier: Typing :: Typed
68
68
  Requires-Python: >=3.10
69
69
  Description-Content-Type: text/markdown
70
70
  License-File: LICENSE
71
- Requires-Dist: lxml>=6.1.1
71
+ Requires-Dist: lxml>=6.2.0
72
72
  Requires-Dist: cssselect>=1.5.0
73
73
  Requires-Dist: orjson>=3.11.8
74
74
  Requires-Dist: tld>=0.13.2
75
- Requires-Dist: w3lib>=2.4.1
75
+ Requires-Dist: w3lib>=2.5.0
76
76
  Requires-Dist: typing_extensions
77
77
  Provides-Extra: fetchers
78
78
  Requires-Dist: click>=8.3.0; extra == "fetchers"
79
- Requires-Dist: curl_cffi>=0.16.1; extra == "fetchers"
80
- Requires-Dist: playwright>=1.62.0; extra == "fetchers"
81
- Requires-Dist: patchright>=1.62.1; extra == "fetchers"
79
+ Requires-Dist: curl_cffi>=0.17.0; extra == "fetchers"
80
+ Requires-Dist: playwright>=1.64.1; extra == "fetchers"
81
+ Requires-Dist: patchright>=1.64.4; extra == "fetchers"
82
82
  Requires-Dist: browserforge>=1.2.4; extra == "fetchers"
83
- Requires-Dist: apify-fingerprint-datapoints>=0.15.0; extra == "fetchers"
84
- Requires-Dist: msgspec>=0.21.1; extra == "fetchers"
83
+ Requires-Dist: apify-fingerprint-datapoints>=0.16.0; extra == "fetchers"
84
+ Requires-Dist: msgspec>=0.23.0; extra == "fetchers"
85
85
  Requires-Dist: anyio>=4.14.0; extra == "fetchers"
86
- Requires-Dist: protego>=0.6.2; extra == "fetchers"
86
+ Requires-Dist: protego>=0.7.0; extra == "fetchers"
87
87
  Provides-Extra: rag
88
- Requires-Dist: markdownify>=1.2.0; extra == "rag"
88
+ Requires-Dist: markdownify>=1.2.4; extra == "rag"
89
89
  Requires-Dist: scrapling[fetchers]; extra == "rag"
90
90
  Provides-Extra: ai
91
91
  Requires-Dist: mcp>=2.0.0; extra == "ai"
92
- Requires-Dist: markdownify>=1.2.0; extra == "ai"
92
+ Requires-Dist: markdownify>=1.2.4; extra == "ai"
93
93
  Requires-Dist: scrapling[fetchers]; extra == "ai"
94
94
  Provides-Extra: shell
95
95
  Requires-Dist: IPython>=8.37; extra == "shell"
96
- Requires-Dist: markdownify>=1.2.0; extra == "shell"
96
+ Requires-Dist: markdownify>=1.2.4; extra == "shell"
97
97
  Requires-Dist: scrapling[fetchers]; extra == "shell"
98
98
  Provides-Extra: all
99
99
  Requires-Dist: scrapling[ai,shell]; extra == "all"
@@ -219,12 +219,22 @@ This prints `10` and saves the quotes and authors to `quotes.json`.
219
219
  <table>
220
220
  <tr>
221
221
  <td width="200">
222
- <a href="https://go.nodemaven.com/scraplingseptember" target="_blank" title="Proxies with the Highest IP Scores">
222
+ <a href="https://go.nodemaven.com/scraplingoctober" target="_blank" title="Proxies with the Highest IP Scores">
223
223
  <img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/NodeMaven.jpg" width="240" height="100">
224
224
  </a>
225
225
  </td>
226
226
  <td>
227
- <a href="https://go.nodemaven.com/scraplingseptember" target="_blank">NodeMaven</a> - The most efficient proxy provider for Web Scraping and Automation with the Highest Quality IP on the market. Use code SCRAPLING35 for 35% discount.
227
+ <a href="https://go.nodemaven.com/scraplingoctober" target="_blank">NodeMaven</a> - The most efficient proxy provider for Web Scraping and Automation with the Highest Quality IP on the market. SCRAPLING2X - 2X traffic for Black Friday
228
+ </td>
229
+ </tr>
230
+ <tr>
231
+ <td width="200">
232
+ <a href="https://usestring.ai/?utm_source=github-sponsor&utm_campaign=scrapling" target="_blank" title="Web access for everyone">
233
+ <img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/string.png" width="240" height="100">
234
+ </a>
235
+ </td>
236
+ <td>
237
+ <a href="https://usestring.ai/?utm_source=github-sponsor&utm_campaign=scrapling" target="_blank">String</a>: web search and fetch for AI agents. 98.6% success on 100 bot-protected sites, first of 17 APIs in our own benchmark.
228
238
  </td>
229
239
  </tr>
230
240
  <tr>
@@ -272,42 +282,42 @@ This prints `10` and saves the quotes and authors to `quotes.json`.
272
282
  </tr>
273
283
  <tr>
274
284
  <td width="200">
275
- <a href="https://www.swiftproxy.net/?ref=D4Vinci" target="_blank" title="Scalable Solutions for Web Data Access">
276
- <img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/SwiftProxy.png">
285
+ <a href="https://byteful.com/?utm_source=github&utm_medium=github-sponsor&utm_campaign=scrapling_github_sponsor" target="_blank" title="Ethically sourced residential proxy infrastructure powering web scraping and AI agents">
286
+ <img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/byteful.png">
277
287
  </a>
278
288
  </td>
279
289
  <td>
280
- <a href="https://www.swiftproxy.net/?ref=D4Vinci" target="_blank">Swiftproxy</a> provides scalable residential proxies with 80M+ IPs across 195+ countries, delivering fast, reliable connections, automatic rotation, and strong anti-block performance. Free trial available.
290
+ <a href="https://byteful.com/?utm_source=github&utm_medium=github-sponsor&utm_campaign=scrapling_github_sponsor" target="_blank">Byteful</a> supplies ethical residential, mobile, ISP, and datacenter proxies, plus scraping and AI automation tools. Use code SCRAPLING10: 10% off residential proxies.
281
291
  </td>
282
292
  </tr>
283
293
  <tr>
284
294
  <td width="200">
285
- <a href="https://byteful.com/?utm_source=github&utm_medium=github-sponsor&utm_campaign=scrapling_github_sponsor" target="_blank" title="Ethically sourced residential proxy infrastructure powering web scraping and AI agents">
286
- <img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/byteful.png">
295
+ <a href="https://www.lundproxy.com/unlimited-residential-bandwidth.html?utm_source=github&utm_medium=sponsorship&utm_campaign=scrapling&utm_content=banner" target="_blank" title="Unlimited residential traffic, sized only by bandwidth.">
296
+ <img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/lundproxy.png">
287
297
  </a>
288
298
  </td>
289
299
  <td>
290
- <a href="https://byteful.com/?utm_source=github&utm_medium=github-sponsor&utm_campaign=scrapling_github_sponsor" target="_blank">Byteful</a> supplies ethical residential, mobile, ISP, and datacenter proxies, plus scraping and AI automation tools. Use code SCRAPLING10: 10% off residential proxies.
300
+ <a href="https://www.lundproxy.com?utm_source=github&utm_medium=sponsorship&utm_campaign=scrapling&utm_content=text" target="_blank">LundProxy</a>: Stop paying per GB. Unlimited residential traffic, 100M+ IPs, 190+ countries. Pay by bandwidth. Request a free 50 Mbps residential proxies trial.
291
301
  </td>
292
302
  </tr>
293
303
  <tr>
294
304
  <td width="200">
295
- <a href="https://proxylane.dev/?utm_source=scrapling&utm_medium=partnership&utm_campaign=scrapling_platinum_202609&utm_content=github_readme" target="_blank" title="28M+ clean residential IPs for browser automation. No Blocks. No CAPTCHAs. Pay-as-you-Go.">
296
- <img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/proxylane.png">
305
+ <a href="https://resolvr.com/?ref=scrapling" target="_blank" title="Captcha and Browser challenges, solved on real devices loading the page.">
306
+ <img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/resolvr.jpg">
297
307
  </a>
298
308
  </td>
299
309
  <td>
300
- <a href="https://proxylane.dev/?utm_source=scrapling&utm_medium=partnership&utm_campaign=scrapling_platinum_202609&utm_content=github_readme" target="_blank">ProxyLane</a>: Reduce blocks and CAPTCHAs by 90%. 28M Premium Residential IPs for Heavy Web Scraping. 195 countries. City/ISP/ZIP targeting. Sticky/rotating sessions. Non-expiring traffic from $2/GB. Code <strong>SCRAPEANDTAKE</strong>: <em>25% off</em>.
310
+ <a href="https://resolvr.com/?ref=scrapling" target="_blank">Resolvr</a>: Scraping at scale means CAPTCHAs at scale. Resolvr solves reCAPTCHA and Cloudflare challenges on real devices through one API. Free beta access is available now.
301
311
  </td>
302
312
  </tr>
303
313
  <tr>
304
314
  <td width="200">
305
- <a href="https://www.lundproxy.com/unlimited-residential-bandwidth.html?utm_source=github&utm_medium=sponsorship&utm_campaign=scrapling&utm_content=banner" target="_blank" title="Unlimited residential traffic, sized only by bandwidth.">
306
- <img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/lundproxy.png">
315
+ <a href="https://nonecap.com/solutions/scrapling/?ref=scrapling" target="_blank" title="hCaptcha solver as an API.">
316
+ <img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/Nonecap.png">
307
317
  </a>
308
318
  </td>
309
319
  <td>
310
- <a href="https://www.lundproxy.com?utm_source=github&utm_medium=sponsorship&utm_campaign=scrapling&utm_content=text" target="_blank">LundProxy</a>: Stop paying per GB. Unlimited residential traffic, 100M+ IPs, 190+ countries. Pay by bandwidth. Request a free 50 Mbps residential proxies trial.
320
+ hCaptcha in your Scrapling runs? <a href="https://nonecap.com/solutions/scrapling/?ref=scrapling" target="_blank">NoneCap</a> returns valid hCaptcha tokens, Enterprise sitekeys included, through one API. 1,300 free credits on signup.
311
321
  </td>
312
322
  </tr>
313
323
  <tr>
@@ -333,14 +343,14 @@ This prints `10` and saves the quotes and authors to `quotes.json`.
333
343
 
334
344
  <a href="https://serpapi.com/?utm_source=scrapling" target="_blank" title="Scrape Google and other search engines with SerpApi"><img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/SerpApi.png"></a>
335
345
  <a href="https://visit.decodo.com/Dy6W0b" target="_blank" title="Try the Most Efficient Residential Proxies for Free"><img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/decodo.png"></a>
336
- <a href="https://proxyempire.io/?ref=scrapling&utm_source=github&utm_medium=paid_referral&utm_campaign=open_source_sponsorship&utm_content=scrapling" target="_blank" title="Collect The Data Your Project Needs with the Best Residential Proxies"><img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/ProxyEmpire.png"></a>
337
346
  <a href="https://www.webshare.io/?referral_code=48r2m2cd5uz1" target="_blank" title="The Most Reliable Proxy with Unparalleled Performance"><img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/webshare.png"></a>
338
347
  <a href="https://proxiware.com/?ref=scrapling" target="_blank" title="Collect Any Data. At Any Scale."><img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/proxiware.png"></a>
348
+ <a href="http://olostep.com/" target="_blank" title="Web Data Infrastructure for AI"><img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/olostep.png"></a>
339
349
 
340
350
 
341
351
  <!-- /sponsors -->
342
352
 
343
- <i><sub>Do you want to show your ad here? Click [here](https://github.com/sponsors/D4Vinci) and choose the tier that suits you!</sub></i>
353
+ <i><sub>Do you want to show your ad here? Choose the [Gold tier](https://github.com/sponsors/D4Vinci/sponsorships?tier_id=591422).</sub></i>
344
354
 
345
355
  ---
346
356
 
@@ -368,7 +378,7 @@ This prints `10` and saves the quotes and authors to `quotes.json`.
368
378
  - **Proxy Rotation**: Built-in `ProxyRotator` with cyclic or custom rotation strategies across all session types, plus per-request proxy overrides.
369
379
  - **Domain & Ad Blocking**: Block requests to specific domains (and their subdomains) or enable built-in ad blocking (~3,500 known ad/tracker domains) in browser-based fetchers.
370
380
  - **DNS Leak Prevention**: Optional DNS-over-HTTPS support to route DNS queries through Cloudflare's DoH, preventing DNS leaks when using proxies.
371
- - **Remote Browsers**: Instead of launching a browser locally, connect to one that's already running through CDP with `cdp_url`, whether it's on the same machine, another host, or a managed browser provider. You can also point any browser fetcher at your own Chromium build with `executable_path`.
381
+ - **Remote Browsers**: Instead of launching a browser locally, connect to one that's already running through CDP with `cdp_url`, whether it's on the same machine, another host, or a managed browser provider. You can also point any browser fetcher at your own Chromium build with the `SCRAPLING_EXECUTABLE_PATH` environment variable.
372
382
  - **Background API Capture**: Enable `record_requests=True` on a browser session, then search its saved responses with `session.network.search(limit=None)`. Read API data and HTTP errors across page loads without sending requests again. History is bounded and saves text response bodies.
373
383
  - **Async Support**: Complete async support across all fetchers and dedicated async session classes.
374
384
 
@@ -624,6 +634,24 @@ pip install scrapling
624
634
  > [!IMPORTANT]
625
635
  > This installation only includes the parser engine and its dependencies, without any fetchers or commandline dependencies. So importing anything from `scrapling.fetchers` or `scrapling.spiders`, like in the examples above, will raise `ModuleNotFoundError` with this installation alone. If you are going to use any of the fetchers or spiders, install the fetchers' dependencies first as shown below.
626
636
 
637
+ ### Set up Scrapling with your AI agent
638
+
639
+ Paste this prompt into Claude Code, Codex, Hermes, Openclaw, or any agent with shell access:
640
+
641
+ ```text
642
+ Install scrapling[ai] from https://pypi.org/project/scrapling/ in this project's
643
+ virtual environment. Run `scrapling install` for browser support.
644
+
645
+ Download the official skill ZIP and extract it into this agent's skills directory.
646
+ https://github.com/D4Vinci/Scrapling/raw/refs/heads/main/agent-skill/Scrapling-Skill.zip
647
+
648
+ Register the full path to this environment's scrapling-mcp in this agent's MCP
649
+ settings. Call Scrapling's list_sessions tool to verify the connection. Tell me
650
+ the result or if I need to restart the app.
651
+ ```
652
+
653
+ The agent handles the installation of Scrapling, its Agent Skill, and its MCP server.
654
+
627
655
  ### Optional Dependencies
628
656
 
629
657
  1. If you are going to use any of the extra features below, the fetchers, or their classes, you will need to install fetchers' dependencies and their browser dependencies as follows:
@@ -118,12 +118,22 @@ This prints `10` and saves the quotes and authors to `quotes.json`.
118
118
  <table>
119
119
  <tr>
120
120
  <td width="200">
121
- <a href="https://go.nodemaven.com/scraplingseptember" target="_blank" title="Proxies with the Highest IP Scores">
121
+ <a href="https://go.nodemaven.com/scraplingoctober" target="_blank" title="Proxies with the Highest IP Scores">
122
122
  <img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/NodeMaven.jpg" width="240" height="100">
123
123
  </a>
124
124
  </td>
125
125
  <td>
126
- <a href="https://go.nodemaven.com/scraplingseptember" target="_blank">NodeMaven</a> - The most efficient proxy provider for Web Scraping and Automation with the Highest Quality IP on the market. Use code SCRAPLING35 for 35% discount.
126
+ <a href="https://go.nodemaven.com/scraplingoctober" target="_blank">NodeMaven</a> - The most efficient proxy provider for Web Scraping and Automation with the Highest Quality IP on the market. SCRAPLING2X - 2X traffic for Black Friday
127
+ </td>
128
+ </tr>
129
+ <tr>
130
+ <td width="200">
131
+ <a href="https://usestring.ai/?utm_source=github-sponsor&utm_campaign=scrapling" target="_blank" title="Web access for everyone">
132
+ <img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/string.png" width="240" height="100">
133
+ </a>
134
+ </td>
135
+ <td>
136
+ <a href="https://usestring.ai/?utm_source=github-sponsor&utm_campaign=scrapling" target="_blank">String</a>: web search and fetch for AI agents. 98.6% success on 100 bot-protected sites, first of 17 APIs in our own benchmark.
127
137
  </td>
128
138
  </tr>
129
139
  <tr>
@@ -171,42 +181,42 @@ This prints `10` and saves the quotes and authors to `quotes.json`.
171
181
  </tr>
172
182
  <tr>
173
183
  <td width="200">
174
- <a href="https://www.swiftproxy.net/?ref=D4Vinci" target="_blank" title="Scalable Solutions for Web Data Access">
175
- <img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/SwiftProxy.png">
184
+ <a href="https://byteful.com/?utm_source=github&utm_medium=github-sponsor&utm_campaign=scrapling_github_sponsor" target="_blank" title="Ethically sourced residential proxy infrastructure powering web scraping and AI agents">
185
+ <img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/byteful.png">
176
186
  </a>
177
187
  </td>
178
188
  <td>
179
- <a href="https://www.swiftproxy.net/?ref=D4Vinci" target="_blank">Swiftproxy</a> provides scalable residential proxies with 80M+ IPs across 195+ countries, delivering fast, reliable connections, automatic rotation, and strong anti-block performance. Free trial available.
189
+ <a href="https://byteful.com/?utm_source=github&utm_medium=github-sponsor&utm_campaign=scrapling_github_sponsor" target="_blank">Byteful</a> supplies ethical residential, mobile, ISP, and datacenter proxies, plus scraping and AI automation tools. Use code SCRAPLING10: 10% off residential proxies.
180
190
  </td>
181
191
  </tr>
182
192
  <tr>
183
193
  <td width="200">
184
- <a href="https://byteful.com/?utm_source=github&utm_medium=github-sponsor&utm_campaign=scrapling_github_sponsor" target="_blank" title="Ethically sourced residential proxy infrastructure powering web scraping and AI agents">
185
- <img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/byteful.png">
194
+ <a href="https://www.lundproxy.com/unlimited-residential-bandwidth.html?utm_source=github&utm_medium=sponsorship&utm_campaign=scrapling&utm_content=banner" target="_blank" title="Unlimited residential traffic, sized only by bandwidth.">
195
+ <img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/lundproxy.png">
186
196
  </a>
187
197
  </td>
188
198
  <td>
189
- <a href="https://byteful.com/?utm_source=github&utm_medium=github-sponsor&utm_campaign=scrapling_github_sponsor" target="_blank">Byteful</a> supplies ethical residential, mobile, ISP, and datacenter proxies, plus scraping and AI automation tools. Use code SCRAPLING10: 10% off residential proxies.
199
+ <a href="https://www.lundproxy.com?utm_source=github&utm_medium=sponsorship&utm_campaign=scrapling&utm_content=text" target="_blank">LundProxy</a>: Stop paying per GB. Unlimited residential traffic, 100M+ IPs, 190+ countries. Pay by bandwidth. Request a free 50 Mbps residential proxies trial.
190
200
  </td>
191
201
  </tr>
192
202
  <tr>
193
203
  <td width="200">
194
- <a href="https://proxylane.dev/?utm_source=scrapling&utm_medium=partnership&utm_campaign=scrapling_platinum_202609&utm_content=github_readme" target="_blank" title="28M+ clean residential IPs for browser automation. No Blocks. No CAPTCHAs. Pay-as-you-Go.">
195
- <img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/proxylane.png">
204
+ <a href="https://resolvr.com/?ref=scrapling" target="_blank" title="Captcha and Browser challenges, solved on real devices loading the page.">
205
+ <img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/resolvr.jpg">
196
206
  </a>
197
207
  </td>
198
208
  <td>
199
- <a href="https://proxylane.dev/?utm_source=scrapling&utm_medium=partnership&utm_campaign=scrapling_platinum_202609&utm_content=github_readme" target="_blank">ProxyLane</a>: Reduce blocks and CAPTCHAs by 90%. 28M Premium Residential IPs for Heavy Web Scraping. 195 countries. City/ISP/ZIP targeting. Sticky/rotating sessions. Non-expiring traffic from $2/GB. Code <strong>SCRAPEANDTAKE</strong>: <em>25% off</em>.
209
+ <a href="https://resolvr.com/?ref=scrapling" target="_blank">Resolvr</a>: Scraping at scale means CAPTCHAs at scale. Resolvr solves reCAPTCHA and Cloudflare challenges on real devices through one API. Free beta access is available now.
200
210
  </td>
201
211
  </tr>
202
212
  <tr>
203
213
  <td width="200">
204
- <a href="https://www.lundproxy.com/unlimited-residential-bandwidth.html?utm_source=github&utm_medium=sponsorship&utm_campaign=scrapling&utm_content=banner" target="_blank" title="Unlimited residential traffic, sized only by bandwidth.">
205
- <img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/lundproxy.png">
214
+ <a href="https://nonecap.com/solutions/scrapling/?ref=scrapling" target="_blank" title="hCaptcha solver as an API.">
215
+ <img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/Nonecap.png">
206
216
  </a>
207
217
  </td>
208
218
  <td>
209
- <a href="https://www.lundproxy.com?utm_source=github&utm_medium=sponsorship&utm_campaign=scrapling&utm_content=text" target="_blank">LundProxy</a>: Stop paying per GB. Unlimited residential traffic, 100M+ IPs, 190+ countries. Pay by bandwidth. Request a free 50 Mbps residential proxies trial.
219
+ hCaptcha in your Scrapling runs? <a href="https://nonecap.com/solutions/scrapling/?ref=scrapling" target="_blank">NoneCap</a> returns valid hCaptcha tokens, Enterprise sitekeys included, through one API. 1,300 free credits on signup.
210
220
  </td>
211
221
  </tr>
212
222
  <tr>
@@ -232,14 +242,14 @@ This prints `10` and saves the quotes and authors to `quotes.json`.
232
242
 
233
243
  <a href="https://serpapi.com/?utm_source=scrapling" target="_blank" title="Scrape Google and other search engines with SerpApi"><img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/SerpApi.png"></a>
234
244
  <a href="https://visit.decodo.com/Dy6W0b" target="_blank" title="Try the Most Efficient Residential Proxies for Free"><img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/decodo.png"></a>
235
- <a href="https://proxyempire.io/?ref=scrapling&utm_source=github&utm_medium=paid_referral&utm_campaign=open_source_sponsorship&utm_content=scrapling" target="_blank" title="Collect The Data Your Project Needs with the Best Residential Proxies"><img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/ProxyEmpire.png"></a>
236
245
  <a href="https://www.webshare.io/?referral_code=48r2m2cd5uz1" target="_blank" title="The Most Reliable Proxy with Unparalleled Performance"><img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/webshare.png"></a>
237
246
  <a href="https://proxiware.com/?ref=scrapling" target="_blank" title="Collect Any Data. At Any Scale."><img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/proxiware.png"></a>
247
+ <a href="http://olostep.com/" target="_blank" title="Web Data Infrastructure for AI"><img src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/images/olostep.png"></a>
238
248
 
239
249
 
240
250
  <!-- /sponsors -->
241
251
 
242
- <i><sub>Do you want to show your ad here? Click [here](https://github.com/sponsors/D4Vinci) and choose the tier that suits you!</sub></i>
252
+ <i><sub>Do you want to show your ad here? Choose the [Gold tier](https://github.com/sponsors/D4Vinci/sponsorships?tier_id=591422).</sub></i>
243
253
 
244
254
  ---
245
255
 
@@ -267,7 +277,7 @@ This prints `10` and saves the quotes and authors to `quotes.json`.
267
277
  - **Proxy Rotation**: Built-in `ProxyRotator` with cyclic or custom rotation strategies across all session types, plus per-request proxy overrides.
268
278
  - **Domain & Ad Blocking**: Block requests to specific domains (and their subdomains) or enable built-in ad blocking (~3,500 known ad/tracker domains) in browser-based fetchers.
269
279
  - **DNS Leak Prevention**: Optional DNS-over-HTTPS support to route DNS queries through Cloudflare's DoH, preventing DNS leaks when using proxies.
270
- - **Remote Browsers**: Instead of launching a browser locally, connect to one that's already running through CDP with `cdp_url`, whether it's on the same machine, another host, or a managed browser provider. You can also point any browser fetcher at your own Chromium build with `executable_path`.
280
+ - **Remote Browsers**: Instead of launching a browser locally, connect to one that's already running through CDP with `cdp_url`, whether it's on the same machine, another host, or a managed browser provider. You can also point any browser fetcher at your own Chromium build with the `SCRAPLING_EXECUTABLE_PATH` environment variable.
271
281
  - **Background API Capture**: Enable `record_requests=True` on a browser session, then search its saved responses with `session.network.search(limit=None)`. Read API data and HTTP errors across page loads without sending requests again. History is bounded and saves text response bodies.
272
282
  - **Async Support**: Complete async support across all fetchers and dedicated async session classes.
273
283
 
@@ -523,6 +533,24 @@ pip install scrapling
523
533
  > [!IMPORTANT]
524
534
  > This installation only includes the parser engine and its dependencies, without any fetchers or commandline dependencies. So importing anything from `scrapling.fetchers` or `scrapling.spiders`, like in the examples above, will raise `ModuleNotFoundError` with this installation alone. If you are going to use any of the fetchers or spiders, install the fetchers' dependencies first as shown below.
525
535
 
536
+ ### Set up Scrapling with your AI agent
537
+
538
+ Paste this prompt into Claude Code, Codex, Hermes, Openclaw, or any agent with shell access:
539
+
540
+ ```text
541
+ Install scrapling[ai] from https://pypi.org/project/scrapling/ in this project's
542
+ virtual environment. Run `scrapling install` for browser support.
543
+
544
+ Download the official skill ZIP and extract it into this agent's skills directory.
545
+ https://github.com/D4Vinci/Scrapling/raw/refs/heads/main/agent-skill/Scrapling-Skill.zip
546
+
547
+ Register the full path to this environment's scrapling-mcp in this agent's MCP
548
+ settings. Call Scrapling's list_sessions tool to verify the connection. Tell me
549
+ the result or if I need to restart the app.
550
+ ```
551
+
552
+ The agent handles the installation of Scrapling, its Agent Skill, and its MCP server.
553
+
526
554
  ### Optional Dependencies
527
555
 
528
556
  1. If you are going to use any of the extra features below, the fetchers, or their classes, you will need to install fetchers' dependencies and their browser dependencies as follows:
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
  [project]
6
6
  name = "scrapling"
7
7
  # Static version instead of a dynamic version so we can get better layer caching while building docker, check the docker file to understand
8
- version = "0.5"
8
+ version = "0.5.2"
9
9
  description = "Scrapling is an undetectable, powerful, flexible, high-performance Python framework that makes Web Scraping easy and effortless as it should be!"
10
10
  readme = {file = "README.md", content-type = "text/markdown"}
11
11
  license = {file = "LICENSE"}
@@ -61,38 +61,38 @@ classifiers = [
61
61
  "Typing :: Typed",
62
62
  ]
63
63
  dependencies = [
64
- "lxml>=6.1.1",
64
+ "lxml>=6.2.0",
65
65
  "cssselect>=1.5.0",
66
66
  "orjson>=3.11.8",
67
67
  "tld>=0.13.2",
68
- "w3lib>=2.4.1",
68
+ "w3lib>=2.5.0",
69
69
  "typing_extensions"
70
70
  ]
71
71
 
72
72
  [project.optional-dependencies]
73
73
  fetchers = [
74
74
  "click>=8.3.0",
75
- "curl_cffi>=0.16.1",
76
- "playwright>=1.62.0",
77
- "patchright>=1.62.1",
75
+ "curl_cffi>=0.17.0",
76
+ "playwright>=1.64.1",
77
+ "patchright>=1.64.4",
78
78
  "browserforge>=1.2.4",
79
- "apify-fingerprint-datapoints>=0.15.0",
80
- "msgspec>=0.21.1",
79
+ "apify-fingerprint-datapoints>=0.16.0",
80
+ "msgspec>=0.23.0",
81
81
  "anyio>=4.14.0",
82
- "protego>=0.6.2",
82
+ "protego>=0.7.0",
83
83
  ]
84
84
  rag = [
85
- "markdownify>=1.2.0",
85
+ "markdownify>=1.2.4",
86
86
  "scrapling[fetchers]",
87
87
  ]
88
88
  ai = [
89
89
  "mcp>=2.0.0",
90
- "markdownify>=1.2.0",
90
+ "markdownify>=1.2.4",
91
91
  "scrapling[fetchers]",
92
92
  ]
93
93
  shell = [
94
94
  "IPython>=8.37", # The last version that supports Python 3.10
95
- "markdownify>=1.2.0",
95
+ "markdownify>=1.2.4",
96
96
  "scrapling[fetchers]",
97
97
  ]
98
98
  all = [
@@ -1,5 +1,5 @@
1
1
  __author__ = "Karim Shoair (scrapling@proton.me)"
2
- __version__ = "0.5"
2
+ __version__ = "0.5.2"
3
3
  __copyright__ = "Copyright (c) 2024 Karim Shoair"
4
4
 
5
5
  from typing import Any, TYPE_CHECKING
@@ -1,4 +1,3 @@
1
- from os import environ
2
1
  from pathlib import Path
3
2
  from subprocess import check_output
4
3
  from sys import executable as python_executable
@@ -56,7 +55,7 @@ def __Request_and_Save(
56
55
  output_path = Path.cwd() / output_file
57
56
 
58
57
  if ai_targeted:
59
- kwargs.setdefault("block_ads", True)
58
+ kwargs["block_ads"] = True
60
59
  response = fetcher_func(url, **kwargs)
61
60
  Convertor.write_content_to_file(response, str(output_path), css_selector, main_content_only=ai_targeted)
62
61
  log.info(f"Content successfully saved to '{output_path}'")
@@ -120,14 +119,14 @@ def __BuildRequest(headers: List[str], cookies: str, params: str, json: Optional
120
119
  def install(force): # pragma: no cover
121
120
  if force or not __PACKAGE_DIR__.joinpath(".scrapling_dependencies_installed").exists():
122
121
  __Execute(
123
- [python_executable, "-m", "playwright", "install", "chromium"],
122
+ [python_executable, "-m", "patchright", "install", "chromium"],
124
123
  "Installing browsers",
125
124
  )
126
125
  __Execute(
127
126
  [
128
127
  python_executable,
129
128
  "-m",
130
- "playwright",
129
+ "patchright",
131
130
  "install-deps",
132
131
  "chromium",
133
132
  ],
@@ -159,12 +158,6 @@ def install(force): # pragma: no cover
159
158
  @option(
160
159
  "--port", type=int, default=8000, help="The port to use if streamable-http transport is enabled (Default: 8000)"
161
160
  )
162
- @option(
163
- "--executable-path",
164
- type=str,
165
- default=None,
166
- help="Path to a custom Chromium-compatible browser executable for browser-based MCP tools",
167
- )
168
161
  @option(
169
162
  "--auth-token",
170
163
  type=str,
@@ -186,10 +179,10 @@ def install(force): # pragma: no cover
186
179
  help="Serve the streamable-http transport without authentication (not recommended). Without it, `--http` "
187
180
  "refuses to start unless a token is given",
188
181
  )
189
- def mcp(http, host, port, executable_path, auth_token, allowed_host, no_auth):
182
+ def mcp(http, host, port, auth_token, allowed_host, no_auth):
190
183
  from scrapling.core.ai import ScraplingMCPServer
191
184
 
192
- server = ScraplingMCPServer(executable_path=executable_path, auth_token=auth_token)
185
+ server = ScraplingMCPServer(auth_token=auth_token)
193
186
  try:
194
187
  server.serve(http, host, port, allowed_hosts=allowed_host, allow_unauthenticated=no_auth)
195
188
  except ValueError as e:
@@ -299,12 +292,6 @@ def _common_browser_options(f):
299
292
  default=False,
300
293
  help="Extract only main content and sanitize hidden elements for AI consumption (default: False)",
301
294
  ),
302
- option(
303
- "--executable-path",
304
- type=str,
305
- default=None,
306
- help="Path to a custom Chromium-compatible browser executable. Falls back to the SCRAPLING_EXECUTABLE_PATH environment variable when not set.",
307
- ),
308
295
  option(
309
296
  "--extra-headers",
310
297
  "-H",
@@ -558,7 +545,6 @@ def __build_browser_kwargs(
558
545
  parsed_headers,
559
546
  dns_over_https,
560
547
  block_ads,
561
- executable_path,
562
548
  ) -> Dict[str, Any]:
563
549
  """Build shared kwargs dict for browser-based commands."""
564
550
  kwargs: Dict[str, Any] = {
@@ -580,9 +566,6 @@ def __build_browser_kwargs(
580
566
  kwargs["proxy"] = proxy
581
567
  if parsed_headers:
582
568
  kwargs["extra_headers"] = parsed_headers
583
- executable_path = executable_path or environ.get("SCRAPLING_EXECUTABLE_PATH") or None
584
- if executable_path:
585
- kwargs["executable_path"] = executable_path
586
569
  return kwargs
587
570
 
588
571
 
@@ -626,7 +609,6 @@ def fetch(
626
609
  allow_webgl,
627
610
  hide_canvas,
628
611
  ai_targeted,
629
- executable_path,
630
612
  dns_over_https,
631
613
  block_ads,
632
614
  ):
@@ -646,7 +628,6 @@ def fetch(
646
628
  parsed_headers,
647
629
  dns_over_https,
648
630
  block_ads,
649
- executable_path,
650
631
  )
651
632
  kwargs.update(
652
633
  {
@@ -62,7 +62,6 @@ _FETCH_PARAMS = {
62
62
  "additional_args": Optional[Dict],
63
63
  "locale": Optional[str],
64
64
  "real_chrome": bool,
65
- "cdp_url": Optional[str],
66
65
  "useragent": Optional[str],
67
66
  "extra_flags": Optional[List[str]],
68
67
  "blocked_domains": Optional[Set[str]],
@@ -71,7 +70,6 @@ _FETCH_PARAMS = {
71
70
  "retry_delay": int | float,
72
71
  "record_requests": bool,
73
72
  "max_recorded_requests": int,
74
- "executable_path": Optional[str],
75
73
  "dns_over_https": bool,
76
74
  "allow_webgl": bool,
77
75
  "hide_canvas": bool,
@@ -60,6 +60,16 @@ class _MouseClick(_MouseTarget):
60
60
  ]
61
61
 
62
62
 
63
+ class _MouseDown(TypedDict):
64
+ type: Literal["mouse_down"]
65
+ button: NotRequired[Annotated[MouseButton, Field(default="left")]]
66
+
67
+
68
+ class _MouseUp(TypedDict):
69
+ type: Literal["mouse_up"]
70
+ button: NotRequired[Annotated[MouseButton, Field(default="left")]]
71
+
72
+
63
73
  class _MouseWheel(TypedDict):
64
74
  type: Literal["wheel"]
65
75
  delta_x: NotRequired[
@@ -138,6 +148,8 @@ BrowserAction = Annotated[
138
148
  Union[
139
149
  _MouseMove,
140
150
  _MouseClick,
151
+ _MouseDown,
152
+ _MouseUp,
141
153
  _MouseWheel,
142
154
  _TextFormField,
143
155
  _CheckboxFormField,
@@ -213,6 +225,10 @@ async def _run_actions(page: Any, actions: List[BrowserAction], slowly: bool = F
213
225
  await page.keyboard.press(action["key"])
214
226
  elif action["type"] == "wheel":
215
227
  await page.mouse.wheel(action.get("delta_x", 0), action.get("delta_y", 0))
228
+ elif action["type"] == "mouse_down":
229
+ await page.mouse.down(button=action.get("button", "left"))
230
+ elif action["type"] == "mouse_up":
231
+ await page.mouse.up(button=action.get("button", "left"))
216
232
  else:
217
233
  target = action.get("target")
218
234
  timeout = action.get("timeout", 30000)