@@ -6,15 +6,14 @@ Python applications. It provides useful features like parameters encoding to im
66
77- [ Quick Start] ( #quick-start )
88- [ API key] ( #api-key )
9- - [ Retries with exponential backoff] ( #retries-with-exponential-backoff )
109- [ API Reference] ( #api-reference )
1110- [ Examples] ( #examples )
1211
1312<!-- tocstop -->
1413
1514## Quick Start
1615``` python3
17- from scrapingant_client.client import ScrapingAntClient
16+ from scrapingant_client import ScrapingAntClient
1817
1918client = ScrapingAntClient(token = ' <YOUR-SCRAPINGANT-API-TOKEN>' )
2019# Scrape the example.com site.
@@ -35,35 +34,58 @@ All public classes, methods and their parameters can be inspected in this API re
3534
3635| Param | Type | Default |
3736| --- | --- | --- |
38- | [ token] | <code >string</code > | |
39-
37+ | token | <code >string</code > | |
4038
4139
4240* * *
4341
4442<a name =" ScrapingAntClient+scrape " ></a >
4543
46- #### [ ] ( #ScrapingAntClient+scrape ) ` ScrapingAntClient.general_request(url, cookies, js_snippet, proxy_country, return_text) ` ⇒ [ < code >ScrapingAnt API response</ code > ] ( https://docs.scrapingant.com/request-response-format#response-structure )
44+ ### [ ] ( #ScrapingAntClient+scrape ) ` ScrapingAntClient.general_request(url, cookies, js_snippet, proxy_country, return_text) ` ⇒ Response
4745
4846https://docs.scrapingant.com/request-response-format#available-parameters
4947
5048| Param | Type | Default |
5149| --- | --- | --- |
5250| url | <code >string</code > | |
53- | cookies | <code >string </code > | None |
51+ | cookies | <code >List [ Cookie ] </code > | None |
5452| js_snippet | <code >string</code > | None |
55- | proxy_country | <code >string </code > | None |
53+ | proxy_country | <code >ProxyCountry </code > | None |
5654| return_text | <code >boolean</code > | False |
5755
5856** IMPORTANT NOTE:** <code >js_snippet</code > will be encoded to Base64 automatically by the ScrapingAnt client library.
5957
6058* * *
6159
62- <a name =" ScrapingAntApiError " ></a >
60+ ### [ ] ( #Cookie ) Cookie
61+ Class defining cookie. Curently supports only name and value
62+
63+ | Param | Type |
64+ | --- | --- |
65+ | name | <code >string</code > |
66+ | value | <code >string</code > |
67+
68+ * * *
69+
70+ ### [ ] ( #ProxyCountry ) ProxyCountry
71+
72+ Enum containing all available proxy countries
73+
74+ * * *
75+
76+ ### [ ] ( #Response ) Response
77+ Class defining cookie. Curently supports only name and value
78+
79+ | Param | Type |
80+ | --- | --- |
81+ | content | <code >string</code > |
82+ | cookies | <code >List[ Cookie] </code > |
83+
84+ * * *
6385
6486### [ ] ( #ScrapingantClientException ) ScrapingantClientException
6587
66- ` ScrapingantClientException ` is base Exception class, used for all errors
88+ ` ScrapingantClientException ` is base Exception class, used for all errors.
6789
6890* * *
6991
@@ -72,8 +94,8 @@ https://docs.scrapingant.com/request-response-format#available-parameters
7294### Sending custom cookies
7395
7496``` python3
75- from scrapingant_client.client import ScrapingAntClient
76- from scrapingant_client.cookie import Cookie
97+ from scrapingant_client import ScrapingAntClient
98+ from scrapingant_client import Cookie
7799
78100client = ScrapingAntClient(token = ' <YOUR-SCRAPINGANT-API-TOKEN>' )
79101
@@ -93,7 +115,7 @@ response_cookies = result.cookies
93115### Executing custom JS snippet
94116
95117``` python
96- from scrapingant_client.client import ScrapingAntClient
118+ from scrapingant_client import ScrapingAntClient
97119client = ScrapingAntClient(token = ' <YOUR-SCRAPINGANT-API-TOKEN>' )
98120
99121customJsSnippet = """
0 commit comments