Skip to content
This repository was archived by the owner on Jul 5, 2023. It is now read-only.

Commit 118db12

Browse files
authored
update readme
1 parent 20d4dda commit 118db12

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,26 @@ DOWNLOADER_MIDDLEWARES = {
2727
'scrapy_proxycrawl.ProxyCrawlMiddleware': 610
2828
}
2929
```
30+
## Usage
31+
32+
Use the scrapy_proxycrawl.ProxyCrawlRequest instead of the scrapy built-in Request:
33+
34+
```python
35+
from scrapy_proxycrawl import ProxyCrawlRequest
36+
37+
yield ProxyCrawlRequest(
38+
url,
39+
callback=self.parse_result
40+
device='desktop',
41+
country='US',
42+
page_wait=8000,
43+
ajax_wait=True,
44+
dont_filter=True
45+
)
46+
```
47+
The scrapy_proxycrawl.ProxyCrawlRequest accepts additional arguments, used in Proxy Crawl API.
48+
The request and response will be handled by the middleware, switching the urls automatically.
49+
3050

3151
If you have questions or need help using the library, please open an issue or [contact us](https://proxycrawl.com/contact).
3252

0 commit comments

Comments
 (0)