Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/guides/custom-http-client/custom-http-client.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ The <ApiLink to="basic-crawler/class/BasicCrawler">`BasicCrawler`</ApiLink> clas

Crawlee provides several HTTP client implementations out of the box:

- **`GotScrapingHttpClient`** (default) - Uses the `got-scraping` library for browser-like requests with support for custom headers, browser fingerprints, and proxies.
- **`ImpitHttpClient`** - Uses the `impit` library for making requests that closely mimic browser behavior.
- **`ImpitHttpClient`** (default) - Uses the `impit` library for making requests that closely mimic browser behavior.
- **`GotScrapingHttpClient`** - Uses the `got-scraping` library for browser-like requests with support for custom headers, browser fingerprints, and proxies. This was the default HTTP client in Crawlee v3.
- **`FetchHttpClient`** - Simple implementation using the native `fetch` API (does not support proxies).

## Implementing a custom HTTP client
Expand Down
2 changes: 1 addition & 1 deletion packages/basic-crawler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@apify/timeout": "^0.3.2",
"@apify/utilities": "^2.15.5",
"@crawlee/core": "workspace:*",
"@crawlee/got-scraping-client": "workspace:*",
"@crawlee/impit-client": "workspace:^",
"@crawlee/types": "workspace:*",
"@crawlee/utils": "workspace:*",
"csv-stringify": "^6.5.2",
Expand Down
6 changes: 3 additions & 3 deletions packages/basic-crawler/src/internals/basic-crawler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ import {
Statistics,
validators,
} from '@crawlee/core';
import { GotScrapingHttpClient } from '@crawlee/got-scraping-client';
import { ImpitHttpClient } from '@crawlee/impit-client';
import type {
Awaitable,
BaseHttpClient,
Expand Down Expand Up @@ -377,7 +377,7 @@ export interface BasicCrawlerOptions<

/**
* HTTP client implementation for the `sendRequest` context helper and for plain HTTP crawling.
* Defaults to a new instance of {@apilink GotScrapingHttpClient}
* Defaults to a new instance of {@apilink ImpitHttpClient}
*/
httpClient?: BaseHttpClient;

Expand Down Expand Up @@ -807,7 +807,7 @@ export class BasicCrawler<
this.requestManager = new RequestManagerTandem(requestList, () => this.openOwnedRequestQueue());
}

this.httpClient = httpClient ?? new GotScrapingHttpClient({ logger: this.log });
this.httpClient = httpClient ?? new ImpitHttpClient({ logger: this.log });
this.proxyConfiguration = proxyConfiguration;
this.statusMessageLoggingInterval = statusMessageLoggingInterval;
this.statusMessageCallback = statusMessageCallback as StatusMessageCallback;
Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading