You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Thank you for your interest in contributing to Scrapling!
4
4
5
5
Everybody is invited and welcome to contribute to Scrapling.
6
6
7
-
Minor changes have a better chance of being included promptly. Adding unit tests for new features or test cases for bugs you've fixed helps us ensure that the Pull Request (PR) is acceptable.
7
+
Minor changes are more likely to be included promptly. Adding unit tests for new features or test cases for bugs you've fixed helps us ensure that the Pull Request (PR) is acceptable.
8
8
9
9
There are many ways to contribute to Scrapling. Here are some of them:
10
10
@@ -18,7 +18,7 @@ There are many ways to contribute to Scrapling. Here are some of them:
18
18
19
19
If you have decided to make a contribution to Scrapling, but you do not know what to contribute, here are some ways to find pending work:
20
20
21
-
- Check out the [contribution](https://github.com/D4Vinci/Scrapling/contribute) GitHub page, which lists open issues tagged as good first issue. These issues provide a good starting point.
21
+
- Check out the [contribution](https://github.com/D4Vinci/Scrapling/contribute) GitHub page, which lists open issues tagged as `good first issue`. These issues provide a good starting point.
22
22
- There are also the [help wanted](https://github.com/D4Vinci/Scrapling/issues?q=is%3Aissue%20label%3A%22help%20wanted%22%20state%3Aopen) issues, but know that some may require familiarity with the Scrapling code base first. You can also target any other issue, provided it is not tagged as `invalid`, `wontfix`, or similar tags.
23
23
- If you enjoy writing automated tests, you can work on increasing our test coverage. Currently, the test coverage is around 90–92%.
24
24
- Join the [Discord community](https://discord.gg/EMgGbDceNQ) and ask questions in the `#help` channel.
@@ -38,7 +38,7 @@ Please follow these coding conventions as we do when writing code for Scrapling:
38
38
|`refactor:`| Code refactoring |
39
39
|`chore:`| Maintenance tasks |
40
40
41
-
Then include the details of the change in the body/description of the commit message.
41
+
Then include the details of the change in the commit message body/description.
42
42
43
43
Example:
44
44
```
@@ -99,7 +99,7 @@ pytest --cov=scrapling tests/
99
99
To ensure that your PR gets accepted, please make sure that your PR is based on the latest changes from the dev branch and that it satisfies the following requirements:
100
100
101
101
- The PR should be made against the [**dev**](https://github.com/D4Vinci/Scrapling/tree/dev) branch of Scrapling. Any PR made against the main branch will be rejected.
102
-
- The code should be passing all available tests. We are using tox with GitHub's CI to run the current tests on all supported Python versions with every commit.
102
+
- The code should be passing all available tests. We use tox with GitHub's CI to run the current tests on all supported Python versions for every code-related commit.
103
103
- The code should be passing all code quality checks we mentioned above. We are using GitHub's CI to enforce the code style checks performed by pre-commit. If you were using the pre-commit hooks we discussed above, you should not see any issues when committing your changes.
104
104
- Make your changes, keep the code clean with an explanation of any part that might be vague, and remember to create a separate virtual environment for this project.
105
105
- If you are adding a new feature, please add tests for it.
Copy file name to clipboardExpand all lines: docs/README.md
+12-13Lines changed: 12 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,16 +90,16 @@ Built for the modern Web, Scrapling features **its own rapid parsing engine** an
90
90
91
91
### Advanced Websites Fetching with Session Support
92
92
-**HTTP Requests**: Fast and stealthy HTTP requests with the `Fetcher` class. Can impersonate browsers' TLS fingerprint, headers, and use HTTP3.
93
-
-**Dynamic Loading**: Fetch dynamic websites with full browser automation through the `DynamicFetcher` class supporting Playwright's Chromium, real Chrome, and custom stealth mode.
94
-
-**Anti-bot Bypass**: Advanced stealth capabilities with `StealthyFetcher`using a modified version of Firefox and fingerprint spoofing. Can bypass all types of Cloudflare's Turnstile and Interstitial with automation easily.
93
+
-**Dynamic Loading**: Fetch dynamic websites with full browser automation through the `DynamicFetcher` class supporting Playwright's Chromiumand Google's Chrome.
94
+
-**Anti-bot Bypass**: Advanced stealth capabilities with `StealthyFetcher` and fingerprint spoofing. Can easily bypass all types of Cloudflare's Turnstile/Interstitial with automation.
95
95
-**Session Management**: Persistent session support with `FetcherSession`, `StealthySession`, and `DynamicSession` classes for cookie and state management across requests.
96
96
-**Async Support**: Complete async support across all fetchers and dedicated async session classes.
97
97
98
98
### Adaptive Scraping & AI Integration
99
99
- 🔄 **Smart Element Tracking**: Relocate elements after website changes using intelligent similarity algorithms.
100
100
- 🎯 **Smart Flexible Selection**: CSS selectors, XPath selectors, filter-based search, text search, regex search, and more.
101
101
- 🔍 **Find Similar Elements**: Automatically locate elements similar to found elements.
102
-
- 🤖 **MCP Server to be used with AI**: Built-in MCP server for AI-assisted Web Scraping and data extraction. The MCP server features custom, powerful capabilities that utilize Scrapling to extract targeted content before passing it to the AI (Claude/Cursor/etc), thereby speeding up operations and reducing costs by minimizing token usage. ([demo video](https://www.youtube.com/watch?v=qyFk3ZNwOxE))
102
+
- 🤖 **MCP Server to be used with AI**: Built-in MCP server for AI-assisted Web Scraping and data extraction. The MCP server features powerful, custom capabilities that leverage Scrapling to extract targeted content before passing it to the AI (Claude/Cursor/etc), thereby speeding up operations and reducing costs by minimizing token usage. ([demo video](https://www.youtube.com/watch?v=qyFk3ZNwOxE))
@@ -153,7 +153,7 @@ data = page.css('.quote .text::text')
153
153
```
154
154
155
155
> [!NOTE]
156
-
> There's a wonderful guide to get you started quickly with Scraping[here](https://substack.thewebscraping.club/p/scrapling-hands-on-guide) written by The Web Scraping Club. In case you find it easier to get you started than the [documentation website](https://scrapling.readthedocs.io/en/latest/).
156
+
> There's a wonderful guide to get you started quickly with Scrapling[here](https://substack.thewebscraping.club/p/scrapling-hands-on-guide) written by The Web Scraping Club. In case you find it easier to get you started than the [documentation website](https://scrapling.readthedocs.io/en/latest/).
157
157
158
158
### Advanced Parsing & Navigation
159
159
```python
@@ -222,13 +222,12 @@ Scrapling v0.3 includes a powerful command-line interface:
# Extract pages to a file directly without programming (Extracts the content inside `body` tag by default)
230
-
# If the output file ends with `.txt`, then the text content of the target will be extracted.
231
-
# If ended with `.md`, it will be a markdown representation of the HTML content, and `.html` will be the HTML content right away.
228
+
```
229
+
Extract pages to a file directly without programming (Extracts the content inside the `body` tag by default). If the output file ends with `.txt`, then the text content of the target will be extracted. If it ends in `.md`, it will be a Markdown representation of the HTML content; if it ends in `.html`, it will be the HTML content itself.
230
+
```bash
232
231
scrapling extract get 'https://example.com' content.md
233
232
scrapling extract get 'https://example.com' content.txt --css-selector '#fromSkipToProducts' --impersonate 'chrome'# All elements matching the CSS selector '#fromSkipToProducts'
Scrapling isn't just powerful—it's also blazing fast, and the updates since version 0.3 have delivered exceptional performance improvements across all operations.
242
+
Scrapling isn't just powerful—it's also blazing fast, and the updates since version 0.3 have delivered exceptional performance improvements across all operations. The following benchmarks compare Scrapling's parser with other popular libraries.
244
243
245
244
### Text Extraction Speed Test (5000 nested elements)
246
245
@@ -280,14 +279,14 @@ Starting with v0.3.2, this installation only includes the parser engine and its
280
279
281
280
### Optional Dependencies
282
281
283
-
1. If you are going to use any of the extra features below, the fetchers, or their classes, then you need to install fetchers' dependencies and then install their browser dependencies with
282
+
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:
284
283
```bash
285
284
pip install "scrapling[fetchers]"
286
285
287
286
scrapling install
288
287
```
289
288
290
-
This downloads all browsers with their system dependencies and fingerprint manipulation dependencies.
289
+
This downloads all browsers, along with their system dependencies and fingerprint manipulation dependencies.
291
290
292
291
2. Extra features:
293
292
- Install the MCP server feature:
@@ -313,7 +312,7 @@ Or download it from the GitHub registry:
313
312
```bash
314
313
docker pull ghcr.io/d4vinci/scrapling:latest
315
314
```
316
-
This image is automatically built and pushed through GitHub actions on the repository's main branch.
315
+
This image is automatically built and pushed using GitHub Actions and the repository's main branch.
Copy file name to clipboardExpand all lines: docs/README_AR.md
+11-12Lines changed: 11 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,16 +87,16 @@ Scrapling ليست مجرد مكتبة أخرى لاستخراج بيانات ا
87
87
88
88
### جلب متقدم للمواقع مع دعم الجلسات
89
89
-**طلبات HTTP**: طلبات HTTP سريعة وخفية مع فئة `Fetcher`. يمكنها تقليد بصمة TLS للمتصفح والرؤوس واستخدام HTTP3.
90
-
-**التحميل الديناميكي**: جلب المواقع الديناميكية مع أتمتة كاملة للمتصفح من خلال فئة `DynamicFetcher` التي تدعم Chromium من Playwright، وChrome الحقيقي، ووضع التخفي المخصص.
91
-
-**تجاوز مكافحة الروبوتات**: قدرات تخفي متقدمة مع `StealthyFetcher`باستخدام نسخة معدلة من Firefox وانتحال البصمات. يمكنه تجاوز جميع أنواع Turnstile وInterstitial من Cloudflare بسهولة بالأتمتة.
90
+
-**التحميل الديناميكي**: جلب المواقع الديناميكية مع أتمتة كاملة للمتصفح من خلال فئة `DynamicFetcher` التي تدعم Chromium من Playwright و Google Chrome.
91
+
-**تجاوز مكافحة الروبوتات**: قدرات تخفي متقدمة مع `StealthyFetcher` وانتحال البصمات. يمكنه تجاوز جميع أنواع Turnstile/Interstitial من Cloudflare بسهولة بالأتمتة.
92
92
-**إدارة الجلسات**: دعم الجلسات المستمرة مع فئات `FetcherSession` و`StealthySession` و`DynamicSession` لإدارة ملفات تعريف الارتباط والحالة عبر الطلبات.
93
93
-**دعم Async**: دعم async كامل عبر جميع الجوالب وفئات الجلسات async المخصصة.
94
94
95
95
### الاستخراج التكيفي والتكامل مع الذكاء الاصطناعي
96
96
- 🔄 **تتبع العناصر الذكي**: إعادة تحديد موقع العناصر بعد تغييرات الموقع باستخدام خوارزميات التشابه الذكية.
97
97
- 🎯 **الاختيار المرن الذكي**: محددات CSS، محددات XPath، البحث القائم على الفلاتر، البحث النصي، البحث بالتعبيرات العادية والمزيد.
98
98
- 🔍 **البحث عن عناصر مشابهة**: تحديد العناصر المشابهة للعناصر الموجودة تلقائياً.
99
-
- 🤖 **خادم MCP للاستخدام مع الذكاء الاصطناعي**: خادم MCP مدمج لاستخراج بيانات الويب بمساعدة الذكاء الاصطناعي واستخراج البيانات. يتميز خادم MCP بقدرات مخصصة قوية تستخدم Scrapling لاستخراج المحتوى المستهدف قبل تمريره إلى الذكاء الاصطناعي (Claude/Cursor/إلخ)، وبالتالي تسريع العمليات وتقليل التكاليف عن طريق تقليل استخدام الرموز. ([فيديو توضيحي](https://www.youtube.com/watch?v=qyFk3ZNwOxE))
99
+
- 🤖 **خادم MCP للاستخدام مع الذكاء الاصطناعي**: خادم MCP مدمج لاستخراج بيانات الويب بمساعدة الذكاء الاصطناعي واستخراج البيانات. يتميز خادم MCP بقدرات قوية مخصصة تستفيد من Scrapling لاستخراج المحتوى المستهدف قبل تمريره إلى الذكاء الاصطناعي (Claude/Cursor/إلخ)، وبالتالي تسريع العمليات وتقليل التكاليف عن طريق تقليل استخدام الرموز. ([فيديو توضيحي](https://www.youtube.com/watch?v=qyFk3ZNwOxE))
100
100
101
101
### بنية عالية الأداء ومختبرة في المعارك
102
102
- 🚀 **سريع كالبرق**: أداء محسّن يتفوق على معظم مكتبات استخراج Python.
@@ -212,13 +212,12 @@ async with AsyncStealthySession(max_pages=2) as session:
# استخراج الصفحات إلى ملف مباشرة دون برمجة (يستخرج المحتوى داخل وسم `body` افتراضياً)
220
-
# إذا انتهى ملف الإخراج بـ `.txt`، فسيتم استخراج محتوى النص للهدف.
221
-
# إذا انتهى بـ `.md`، فسيكون تمثيل markdown لمحتوى HTML، و`.html` سيكون محتوى HTML مباشرة.
218
+
```
219
+
استخراج الصفحات إلى ملف مباشرة دون برمجة (يستخرج المحتوى داخل وسم `body` افتراضياً). إذا انتهى ملف الإخراج بـ `.txt`، فسيتم استخراج محتوى النص للهدف. إذا انتهى بـ `.md`، فسيكون تمثيل Markdown لمحتوى HTML؛ إذا انتهى بـ `.html`، فسيكون محتوى HTML نفسه.
220
+
```bash
222
221
scrapling extract get 'https://example.com' content.md
223
222
scrapling extract get 'https://example.com' content.txt --css-selector '#fromSkipToProducts' --impersonate 'chrome'# جميع العناصر المطابقة لمحدد CSS '#fromSkipToProducts'
Scrapling ليس قوياً فقط - إنه أيضاً سريع بشكل مذهل، والتحديثات منذ الإصدار 0.3 قدمت تحسينات أداء استثنائية عبر جميع العمليات.
232
+
Scrapling ليس قوياً فقط - إنه أيضاً سريع بشكل مذهل، والتحديثات منذ الإصدار 0.3 قدمت تحسينات أداء استثنائية عبر جميع العمليات. تقارن المعايير التالية محلل Scrapling مع المكتبات الشائعة الأخرى.
234
233
235
234
### اختبار سرعة استخراج النص (5000 عنصر متداخل)
236
235
@@ -270,14 +269,14 @@ pip install scrapling
270
269
271
270
### التبعيات الاختيارية
272
271
273
-
1. إذا كنت ستستخدم أياً من الميزات الإضافية أدناه، أو الجوالب، أو فئاتها، فأنت بحاجة إلى تثبيت تبعيات الجوالب ثم تثبيت تبعيات المتصفح الخاصة بها بـ
272
+
1. إذا كنت ستستخدم أياً من الميزات الإضافية أدناه، أو الجوالب، أو فئاتها، فستحتاج إلى تثبيت تبعيات الجوالب وتبعيات المتصفح الخاصة بها على النحو التالي:
274
273
```bash
275
274
pip install "scrapling[fetchers]"
276
275
277
276
scrapling install
278
277
```
279
278
280
-
يقوم هذا بتنزيل جميع المتصفحات مع تبعيات النظام وتبعيات معالجة البصمات الخاصة بها.
279
+
يقوم هذا بتنزيل جميع المتصفحات، إلى جانب تبعيات النظام وتبعيات معالجة البصمات الخاصة بها.
0 commit comments