Skip to content

Commit

Permalink
Update readme with note about existing contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
elacuesta committed Jul 15, 2021
1 parent 1011243 commit 9c4c687
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ yield scrapy.Request(
### Creating a context during a crawl

If the context specified in the `playwright_context` meta key does not exist, it will be created.
You can specify keyword arguments to be passed to [`Browser.new_context`](https://playwright.dev/python/docs/api/class-browser#browsernew_contextkwargs)
You can specify keyword arguments to be passed to
[`Browser.new_context`](https://playwright.dev/python/docs/api/class-browser#browsernew_contextkwargs)
in the `playwright_context_kwargs` meta key:

```python
Expand All @@ -205,6 +206,9 @@ yield scrapy.Request(
)
```

Please note that if a context with the specified name already exists,
that context is used and `playwright_context_kwargs` are ignored.

### Closing a context during a crawl

After [receiving the Page object in your callback](#receiving-the-page-object-in-the-callback),
Expand Down

0 comments on commit 9c4c687

Please sign in to comment.