Skip to content

fix: Expose impersonate flag on HTTP crawlers.#1957

Open
Mantisus wants to merge 1 commit into
apify:masterfrom
Mantisus:http-impersonation-expose
Open

fix: Expose impersonate flag on HTTP crawlers.#1957
Mantisus wants to merge 1 commit into
apify:masterfrom
Mantisus:http-impersonation-expose

Conversation

@Mantisus

@Mantisus Mantisus commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Description

  • Expose an impersonate flag on the HTTP crawlers (HttpCrawler, BeautifulSoupCrawler, ParselCrawler) to turn browser impersonation on or off in the default ImpitHttpClient. The flag applies only to the default client; if a custom http_client is passed, it is ignored.
  • Add a guide on working with HTTP headers in web scraping (docs/guides/http_headers.mdx) with a runnable example.

Issues

Testing

  • Added new tests verifying the impersonate flag for all HTTP crawlers.

@Mantisus Mantisus self-assigned this Jun 9, 2026
@Mantisus Mantisus requested review from szaganek and vdusek June 9, 2026 21:51

@Pijukatel Pijukatel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I think it would be better to do just a documentation change and keep the current implementation.

I wrote the reasons into the issue, as the current wording of the issue is asking for a code change.

#1923 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose a browser-impersonation toggle directly on HTTP crawlers

3 participants