File tree Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
name : Chrome web scraper
3
- model : claude-3-7-sonnet-latest
3
+ model : gpt-4o
4
4
arguments :
5
5
- name : query
6
6
description : the question to answer
@@ -13,26 +13,23 @@ tools:
13
13
parameters :
14
14
type : object
15
15
properties :
16
- url :
16
+ endpoint :
17
17
type : string
18
18
description : The url of the websocket endpoint.
19
19
message :
20
20
type : string
21
21
description : The message to send to websocat on stdin.
22
- websocat_args :
23
- type : string
24
- description : The arguments to pass to websocat.
25
22
required :
26
- - url
23
+ - endpoint
27
24
- message
28
- - websocat_args
29
25
container :
30
26
image : vonwig/websocat:latest
31
27
stdin :
32
- content : " {{message|safe}}"
28
+ content : ' {{message|safe}}'
33
29
command :
34
- - " {{websocat_args}}"
35
- - " {{url|safe}}"
30
+ - " -n1"
31
+ - " -H=Host: localhost:9222"
32
+ - ' {{endpoint|safe}}'
36
33
- name : curl
37
34
description : Run a curl command.
38
35
parameters :
@@ -89,11 +86,9 @@ Examples:
89
86
curl -X PUT -H " Host: localhost:9222" -sg http://host.docker.internal:9222/json/new
90
87
91
88
# Navigate to a page
92
- # We are setting --jsonrpc mode, so the first word is the method name and the rest is the arguments.
93
- $MESSAGE =' Page.navigate {"url":"https://www.docker.com"}'
89
+ $MESSAGE =' {...}'
94
90
95
- # Again be sure to set the host header to be localhost:9222 due to chrome's default behavior to only allow localhost
96
- $MESSAGE | websocat -n1 --jsonrpc -H " Host: localhost:9222" --jsonrpc-omit-jsonrpc ws://localhost:9222/devtools/page/< PAGE_ID>
91
+ $MESSAGE | websocat ws://host.docker.internal:9222/devtools/page/< PAGE_ID>
97
92
98
93
{" id" :2," result" :{" frameId" :" A331E56CCB8615EB4FCB720425A82259" ," loaderId" :" EF5AAD19F2F8BB27FAF55F94FFB27DF9" }}
99
94
```
You can’t perform that action at this time.
0 commit comments