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: README.md
+12-3Lines changed: 12 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,9 @@ Dealing with failing web scrapers due to anti-bot protections or website changes
6
6
Scrapling is a high-performance, intelligent web scraping library for Python that automatically adapts to website changes while significantly outperforming popular alternatives. For both beginners and experts, Scrapling provides powerful features while maintaining simplicity.
All fetcher-type classes are imported in the same way
214
+
You might be a little bit confused by now so let me clear things up. All fetcher-type classes are imported in the same way
215
215
```python
216
216
from scrapling import Fetcher, StealthyFetcher, PlayWrightFetcher
217
217
```
218
218
And all of them can take these initialization arguments: `auto_match`, `huge_tree`, `keep_comments`, `storage`, `storage_args`, and `debug` which are the same ones you give to the `Adaptor` class.
219
219
220
+
If you don't want to pass arguments to the generated `Adaptor` object and want to use the default values, you can use this import instead for cleaner code:
221
+
```python
222
+
from scrapling.default import Fetcher, StealthyFetcher, PlayWrightFetcher
Also, the `Response` object returned from all fetchers is the same as `Adaptor` object except it has these added attributes: `status`, `reason`, `cookies`, `headers`, and `request_headers`. All `cookies`, `headers`, and `request_headers` are always of type`dictionary`.
221
230
> [!NOTE]
222
231
> The `auto_match` argument is enabled by default which is the one you should care about the most as you will see later.
0 commit comments