Skip to content

Commit a816f86

Browse files
committed
Update docs for PLAYWRIGHT_PROCESS_REQUEST_HEADERS
1 parent d0e2291 commit a816f86

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -281,14 +281,12 @@ PLAYWRIGHT_DEFAULT_NAVIGATION_TIMEOUT = 10 * 1000 # 10 seconds
281281
### `PLAYWRIGHT_PROCESS_REQUEST_HEADERS`
282282
Type `Optional[Union[Callable, str]]`, default `scrapy_playwright.headers.use_scrapy_headers`
283283

284-
A function (or the path to a function) that processes headers for a given request
285-
and returns a dictionary with the headers to be used (note that, depending on the browser,
286-
additional default headers could be sent as well). Coroutine functions (`async def`) are
287-
supported.
284+
A function (or the path to a function) that processes a Playwright request and returns a
285+
dictionary with headers to be overridden (note that, depending on the browser, additional
286+
default headers could be sent as well). Coroutine functions (`async def`) are supported.
288287

289-
This will be called at least once for each Scrapy request (receiving said request and the
290-
corresponding Playwright request), but it could be called additional times if the given
291-
resource generates more requests (e.g. to retrieve assets like images or scripts).
288+
This will be called at least once for each Scrapy request, but it could be called additional times
289+
if Playwright generates more requests (e.g. to retrieve assets like images or scripts).
292290

293291
The function must return a `dict` object, and receives the following positional arguments:
294292

0 commit comments

Comments
 (0)