@@ -17,23 +17,64 @@ from your terminal?
17
17
1 . You need to subscribe [ scraper api] [ scraper-api ] , test drive is ** free!!!**
18
18
1 . You need to set ` PROMPTAPI_TOKEN ` environment variable after subscription.
19
19
20
- then;
20
+ If you have ` golang ` environment installed, you can fetch via
21
21
22
22
``` bash
23
- $ ...
23
+ $ go get -u github.com/promptapi/scraper-cli
24
24
```
25
25
26
+ Or you can download binaries from [ releases] [ releases ] page
27
+
26
28
---
27
29
28
30
## Usage
29
31
30
- @wip
32
+ ``` bash
33
+ $ scraper-cli -h
34
+
35
+ usage: scraper-cli [flags...]
31
36
32
- ---
37
+ scraper-cli is a command-line interface for Prompt API' s Scraper API. Details
38
+ can be found:
39
+
40
+ https://promptapi.com/marketplace/description/scraper-api
41
+
42
+ you need to signup for Prompt API to get your PROMPTAPI_TOKEN. you can signup
43
+ from:
44
+
45
+ https://promptapi.com/#signup-form
46
+
47
+ application looks for PROMPTAPI_TOKEN environment variable. if you pass
48
+ "token" flag, this will override environment variable lookup.
33
49
34
- ## Development
50
+ required flag(s):
35
51
36
- @wip
52
+ -url web url/address to scrape
53
+
54
+
55
+ optional flags:
56
+
57
+ -country 2 character country code
58
+ -token promptapi apikey instead of PROMPTAPI_TOKEN env-var
59
+ -username for HTTP Realm auth username
60
+ -password for HTTP Realm auth password
61
+ -cookie URL Encoded cookie header
62
+ -referer HTTP referer header
63
+ -selector CSS style selector path such as: a.btn div li
64
+ -version display version information
65
+ -help, -h display help
66
+
67
+
68
+ examples:
69
+
70
+ $ scraper-cli -help
71
+ $ scraper-cli -url "https://promptapi.com"
72
+ $ scraper-cli -url "https://promptapi.com" -country "EE"
73
+ $ scraper-cli -url "https://promptapi.com" -country "EE" -selector "a.btn div li"
74
+
75
+ $ PROMPTAPI_TOKEN="your-api-key" scraper-cli -url "https://promptapi.com"
76
+ $ scraper-cli -url "https://promptapi.com" -token "your-api-key"
77
+ ```
37
78
38
79
---
39
80
@@ -68,3 +109,4 @@ the [code of conduct][coc].
68
109
[scraper-api]: https://promptapi.com/marketplace/description/scraper-api
69
110
[promptapi-signup]: https://promptapi.com/#signup-form
70
111
[coc]: https://github.com/promptapi/scraper-cli/blob/main/CODE_OF_CONDUCT.md
112
+ [releases]: https://github.com/promptapi/scraper-cli/releases
0 commit comments