Karim shoair commited on
Commit ·
61dec8a
1
Parent(s): ccd54cb
docs: update the website to reflect the google referer logic
Browse filesFiles changed (5)
20 unmodified lines212223242526272820 unmodified lines3. It isolates JS execution, removes many Playwright fingerprints, and stops detection through some of the known behaviors that bots do.4. It generates canvas noise to prevent fingerprinting through canvas.5. It automatically patches known methods to detect running in headless mode and provides an option to defeat timezone mismatch attacks.6. It makes requests look as if they came from Google's search page of the requested website.7. and other anti-protection options...## Full list of argumentsScrapling provides many options with this fetcher and its session classes. Before jumping to the [examples](#examples), here's the full list of arguments20 unmodified lines2122232425262720 unmodified lines3. It isolates JS execution, removes many Playwright fingerprints, and stops detection through some of the known behaviors that bots do.4. It generates canvas noise to prevent fingerprinting through canvas.5. It automatically patches known methods to detect running in headless mode and provides an option to defeat timezone mismatch attacks.6. and other anti-protection options...## Full list of argumentsScrapling provides many options with this fetcher and its session classes. Before jumping to the [examples](#examples), here's the full list of arguments
75 unmodified lines767778798081828313 unmodified lines97989910010110210375 unmodified lines| wait_selector | Wait for a specific css selector to be in a specific state. | ✔️ || init_script | An absolute path to a JavaScript file to be executed on page creation for all pages in this session. | ✔️ || wait_selector_state | Scrapling will wait for the given state to be fulfilled for the selector given with `wait_selector`. _Default state is `attached`._ | ✔️ || google_search | Enabled by default, Scrapling will set the referer header as if this request came from a Google search of this website's domain name. | ✔️ || extra_headers | A dictionary of extra headers to add to the request. _The referer set by the `google_search` argument takes priority over the referer set here if used together._ | ✔️ || proxy | The proxy to be used with requests. It can be a string or a dictionary with only the keys 'server', 'username', and 'password'. | ✔️ || real_chrome | If you have a Chrome browser installed on your device, enable this, and the Fetcher will launch and use an instance of your browser. | ✔️ || locale | Specify user locale, for example, `en-GB`, `de-DE`, etc. Locale will affect `navigator.language` value, `Accept-Language` request header value, as well as number and date formatting rules. Defaults to the system default locale. | ✔️ |13 unmodified lines!!! note "Notes:"1. The `disable_resources` option made requests ~25% faster in my tests for some websites and can help save your proxy usage, but be careful with it, as it can cause some websites to never finish loading.2. The `google_search` argument is enabled by default for all requests, making the request appear to come from a Google search page. So, a request for `https://example.com` will set the referer to `https://www.google.com/search?q=example`. Also, if used together, it takes priority over the referer set by the `extra_headers` argument.3. Since version 0.3.13, the `stealth` option has been removed here in favor of the `StealthyFetcher` class, and the `hide_canvas` option has been moved to it. The `disable_webgl` argument has been moved to the `StealthyFetcher` class and renamed as `allow_webgl`.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.75 unmodified lines767778798081828313 unmodified lines97989910010110210375 unmodified lines| wait_selector | Wait for a specific css selector to be in a specific state. | ✔️ || init_script | An absolute path to a JavaScript file to be executed on page creation for all pages in this session. | ✔️ || wait_selector_state | Scrapling will wait for the given state to be fulfilled for the selector given with `wait_selector`. _Default state is `attached`._ | ✔️ || google_search | Enabled by default, Scrapling will set a Google referer header. | ✔️ || extra_headers | A dictionary of extra headers to add to the request. _The referer set by `google_search` takes priority over the referer set here if used together._ | ✔️ || proxy | The proxy to be used with requests. It can be a string or a dictionary with only the keys 'server', 'username', and 'password'. | ✔️ || real_chrome | If you have a Chrome browser installed on your device, enable this, and the Fetcher will launch and use an instance of your browser. | ✔️ || locale | Specify user locale, for example, `en-GB`, `de-DE`, etc. Locale will affect `navigator.language` value, `Accept-Language` request header value, as well as number and date formatting rules. Defaults to the system default locale. | ✔️ |13 unmodified lines!!! note "Notes:"1. The `disable_resources` option made requests ~25% faster in my tests for some websites and can help save your proxy usage, but be careful with it, as it can cause some websites to never finish loading.2. 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.3. Since version 0.3.13, the `stealth` option has been removed here in favor of the `StealthyFetcher` class, and the `hide_canvas` option has been moved to it. The `disable_webgl` argument has been moved to the `StealthyFetcher` class and renamed as `allow_webgl`.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.
19 unmodified lines2021222324252619 unmodified linesAll methods for making requests here share some arguments, so let's discuss them first.- **url**: The targeted URL- **stealthy_headers**: If enabled (default), it creates and adds real browser headers. It also sets the referer header as if this request came from a Google search of the URL's domain.- **follow_redirects**: As the name implies, tell the fetcher to follow redirections. **Enabled by default**- **timeout**: The number of seconds to wait for each request to be finished. **Defaults to 30 seconds**.- **retries**: The number of retries that the fetcher will do for failed requests. **Defaults to three retries**.19 unmodified lines2021222324252619 unmodified linesAll methods for making requests here share some arguments, so let's discuss them first.- **url**: The targeted URL- **stealthy_headers**: If enabled (default), it creates and adds real browser headers. It also sets a Google referer header.- **follow_redirects**: As the name implies, tell the fetcher to follow redirections. **Enabled by default**- **timeout**: The number of seconds to wait for each request to be finished. **Defaults to 30 seconds**.- **retries**: The number of retries that the fetcher will do for failed requests. **Defaults to three retries**.
31 unmodified lines323334353637383914 unmodified lines545556575859606118 unmodified lines8081828384858631 unmodified lines3. It isolates JS execution, removes many Playwright fingerprints, and stops detection through some of the known behaviors that bots do.4. It generates canvas noise to prevent fingerprinting through canvas.5. It automatically patches known methods to detect running in headless mode and provides an option to defeat timezone mismatch attacks.6. It makes requests look as if they came from Google's search page of the requested website.7. and other anti-protection options...## Full list of argumentsScrapling provides many options with this fetcher and its session classes. Before jumping to the [examples](#examples), here's the full list of arguments14 unmodified lines| wait_selector | Wait for a specific css selector to be in a specific state. | ✔️ || init_script | An absolute path to a JavaScript file to be executed on page creation for all pages in this session. | ✔️ || wait_selector_state | Scrapling will wait for the given state to be fulfilled for the selector given with `wait_selector`. _Default state is `attached`._ | ✔️ || google_search | Enabled by default, Scrapling will set the referer header as if this request came from a Google search of this website's domain name. | ✔️ || extra_headers | A dictionary of extra headers to add to the request. _The referer set by the `google_search` argument takes priority over the referer set here if used together._ | ✔️ || proxy | The proxy to be used with requests. It can be a string or a dictionary with only the keys 'server', 'username', and 'password'. | ✔️ || real_chrome | If you have a Chrome browser installed on your device, enable this, and the Fetcher will launch and use an instance of your browser. | ✔️ || locale | Specify user locale, for example, `en-GB`, `de-DE`, etc. Locale will affect `navigator.language` value, `Accept-Language` request header value, as well as number and date formatting rules. Defaults to the system default locale. | ✔️ |18 unmodified lines1. It's basically the same arguments as [DynamicFetcher](dynamic.md#introduction) class, but with these additional arguments: `solve_cloudflare`, `block_webrtc`, `hide_canvas`, and `allow_webgl`.2. The `disable_resources` option made requests ~25% faster in my tests for some websites and can help save your 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, making the request appear to come from a Google search page. So, a request for `https://example.com` will set the referer to `https://www.google.com/search?q=example`. Also, if used together, it takes priority over the referer set by the `extra_headers` argument.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.## Examples31 unmodified lines3233343536373814 unmodified lines535455565758596018 unmodified lines7980818283848531 unmodified lines3. It isolates JS execution, removes many Playwright fingerprints, and stops detection through some of the known behaviors that bots do.4. It generates canvas noise to prevent fingerprinting through canvas.5. It automatically patches known methods to detect running in headless mode and provides an option to defeat timezone mismatch attacks.6. and other anti-protection options...## Full list of argumentsScrapling provides many options with this fetcher and its session classes. Before jumping to the [examples](#examples), here's the full list of arguments14 unmodified lines| wait_selector | Wait for a specific css selector to be in a specific state. | ✔️ || init_script | An absolute path to a JavaScript file to be executed on page creation for all pages in this session. | ✔️ || wait_selector_state | Scrapling will wait for the given state to be fulfilled for the selector given with `wait_selector`. _Default state is `attached`._ | ✔️ || google_search | Enabled by default, Scrapling will set a Google referer header. | ✔️ || extra_headers | A dictionary of extra headers to add to the request. _The referer set by `google_search` takes priority over the referer set here if used together._ | ✔️ || proxy | The proxy to be used with requests. It can be a string or a dictionary with only the keys 'server', 'username', and 'password'. | ✔️ || real_chrome | If you have a Chrome browser installed on your device, enable this, and the Fetcher will launch and use an instance of your browser. | ✔️ || locale | Specify user locale, for example, `en-GB`, `de-DE`, etc. Locale will affect `navigator.language` value, `Accept-Language` request header value, as well as number and date formatting rules. Defaults to the system default locale. | ✔️ |18 unmodified lines1. It's basically the same arguments as [DynamicFetcher](dynamic.md#introduction) class, but with these additional arguments: `solve_cloudflare`, `block_webrtc`, `hide_canvas`, and `allow_webgl`.2. The `disable_resources` option made requests ~25% faster in my tests for some websites and can help save your 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.## Examples
279 unmodified lines28028128228328428528633 unmodified lines320321322323324325326327279 unmodified lines!!! note "Notes:"1. You have the `stealthy_headers` argument, which, when enabled, makes requests to generate real browser headers and use them, including a referer header, as if this request came from a Google search of this domain. It's enabled by default.2. The `impersonate` argument lets you fake the TLS fingerprint for a specific browser version.3. There's also the `http3` argument, which, when enabled, makes the fetcher use HTTP/3 for requests, which makes your requests more authentic33 unmodified lines3. It isolates JS execution, removes many Playwright fingerprints, and stops detection through some of the known behaviors that bots do.4. It generates canvas noise to prevent fingerprinting through canvas.5. It automatically patches known methods to detect running in headless mode and provides an option to defeat timezone mismatch attacks.6. It makes requests look as if they came from Google's search page of the requested website.7. and other anti-protection options...```python>>> from scrapling.fetchers import StealthyFetcher279 unmodified lines28028128228328428528633 unmodified lines320321322323324325326279 unmodified lines!!! note "Notes:"1. You have the `stealthy_headers` argument, which, when enabled, makes requests to generate real browser headers and use them, including a Google referer header. It's enabled by default.2. The `impersonate` argument lets you fake the TLS fingerprint for a specific browser version.3. There's also the `http3` argument, which, when enabled, makes the fetcher use HTTP/3 for requests, which makes your requests more authentic33 unmodified lines3. It isolates JS execution, removes many Playwright fingerprints, and stops detection through some of the known behaviors that bots do.4. It generates canvas noise to prevent fingerprinting through canvas.5. It automatically patches known methods to detect running in headless mode and provides an option to defeat timezone mismatch attacks.6. and other anti-protection options...```python>>> from scrapling.fetchers import StealthyFetcher
agent-skill/Scrapling-Skill/references/fetching/stealthy.md+1-2
docs/fetching/dynamic.md+3-3
docs/fetching/static.md+1-1
docs/fetching/stealthy.md+4-5
docs/overview.md+2-3