1
1
# ScrapingAnt API client for Python
2
+ [ ![ PyPI version] ( https://badge.fury.io/py/scrapingant-client.svg )] ( https://badge.fury.io/py/scrapingant-client )
3
+
2
4
` scrapingant-client ` is the official library to access [ ScrapingAnt API] ( https://docs.scrapingant.com ) from your
3
- Python applications. It provides useful features like parameters encoding to improve the ScrapingAnt usage experience.
5
+ Python applications. It provides useful features like parameters encoding to improve the ScrapingAnt usage experience.
6
+ Requires python 3.6+.
4
7
5
8
<!-- toc -->
6
9
@@ -9,6 +12,7 @@ Python applications. It provides useful features like parameters encoding to im
9
12
- [ API Reference] ( #api-reference )
10
13
- [ Exceptions] ( #exceptions )
11
14
- [ Examples] ( #examples )
15
+ - [ Useful links] ( #useful-links )
12
16
13
17
<!-- tocstop -->
14
18
@@ -28,9 +32,7 @@ In order to get API token you'll need to register at [ScrapingAnt Service](https
28
32
## API Reference
29
33
All public classes, methods and their parameters can be inspected in this API reference.
30
34
31
- <a name =" ScrapingAntClient " ></a >
32
-
33
- #### [ ] ( #ScrapingAntClient ) ScrapingAntClient(token)
35
+ #### ScrapingAntClient(token)
34
36
35
37
Main class of this library.
36
38
@@ -40,7 +42,7 @@ Main class of this library.
40
42
41
43
* * *
42
44
43
- #### [ ] ( # ScrapingAntClient+general_request ) ` ScrapingAntClient .general_request(url, cookies, js_snippet, proxy_country, return_text) ` ⇒ Response
45
+ #### ScrapingAntClient.general_request
44
46
45
47
https://docs.scrapingant.com/request-response-format#available-parameters
46
48
@@ -49,14 +51,14 @@ https://docs.scrapingant.com/request-response-format#available-parameters
49
51
| url | <code >string</code > | |
50
52
| cookies | <code >List[ Cookie] </code > | None |
51
53
| js_snippet | <code >string</code > | None |
52
- | proxy_country | <code >ProxyCountry </code > | None |
54
+ | proxy_country | <code >str </code > | None |
53
55
| return_text | <code >boolean</code > | False |
54
56
55
57
** IMPORTANT NOTE:** <code >js_snippet</code > will be encoded to Base64 automatically by the ScrapingAnt client library.
56
58
57
59
* * *
58
60
59
- #### [ ] ( #Cookie ) Cookie
61
+ #### Cookie
60
62
Class defining cookie. Curently supports only name and value
61
63
62
64
| Param | Type |
@@ -66,21 +68,15 @@ Class defining cookie. Curently supports only name and value
66
68
67
69
* * *
68
70
69
- #### [ ] ( #ProxyCountry ) ProxyCountry
70
-
71
- Enum containing all available proxy countries
72
-
73
- * * *
74
-
75
- #### [ ] ( #Response ) Response
76
- Class defining cookie. Curently supports only name and value
71
+ #### Response
72
+ Class defining response from API.
77
73
78
74
| Param | Type |
79
75
| --- | --- |
80
76
| content | <code >string</code > |
81
77
| cookies | <code >List[ Cookie] </code > |
82
78
83
- ## [ ] ( #exceptions ) Exceptions
79
+ ## Exceptions
84
80
85
81
` ScrapingantClientException ` is base Exception class, used for all errors.
86
82
@@ -131,4 +127,8 @@ result = client.general_request(
131
127
js_snippet = customJsSnippet,
132
128
)
133
129
print (result.content)
134
- ```
130
+ ```
131
+
132
+ ## Useful links
133
+ - [ Scrapingant Api doumentation] ( https://docs.scrapingant.com )
134
+ - [ Scrapingant Js Client] ( https://github.com/scrapingant/scrapingant-client-js )
0 commit comments