Skip to content

Commit afef146

Browse files
committed
Add note about header processing
1 parent 22e1800 commit afef146

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,11 @@ TWISTED_REACTOR = "twisted.internet.asyncioreactor.AsyncioSelectorReactor"
116116
For non-navigation requests (e.g. images, stylesheets, scripts, etc), only the `User-Agent` header
117117
is overriden, for consistency.
118118

119-
There is another function available: `scrapy_playwright.headers.use_playwright_headers`,
120-
which will return the headers from the Playwright request without any changes.
119+
There is another built-in function available: `scrapy_playwright.headers.use_playwright_headers`,
120+
which will return the headers from the Playwright request unmodified.
121+
When using this alternative, please keep in mind that headers passed via the `Request.headers`
122+
attribute or set by Scrapy components are ignored (including cookies set via the `Request.cookies`
123+
attribute).
121124

122125
* `PLAYWRIGHT_MAX_PAGES_PER_CONTEXT` (type `int`, defaults to the value of Scrapy's `CONCURRENT_REQUESTS` setting)
123126

0 commit comments

Comments
 (0)