myagent-ai 1.29.0 → 1.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/aiskills/site-douyin/SKILL.md +123 -0
- package/aiskills/site-gmail/SKILL.md +124 -0
- package/aiskills/site-mail139/SKILL.md +115 -0
- package/aiskills/site-wechat-mp/SKILL.md +116 -0
- package/aiskills/site-weibo/SKILL.md +135 -0
- package/aiskills/site-x-com/SKILL.md +138 -0
- package/aiskills/stealth_browser/SKILL.md +1 -1
- package/main.py +21 -0
- package/package.json +1 -1
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: site-douyin
|
|
3
|
+
description: |
|
|
4
|
+
抖音操作指南 — 使用反检测浏览器操作抖音网页版,包括登录、浏览、发布视频、评论等。
|
|
5
|
+
依赖 stealth browser (DrissionPage),使用独立 Profile: douyin
|
|
6
|
+
metadata:
|
|
7
|
+
category: site_operation
|
|
8
|
+
version: "1.30.0"
|
|
9
|
+
requires: ["stealth-browser"]
|
|
10
|
+
profile: "douyin"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# 抖音操作
|
|
14
|
+
|
|
15
|
+
## 概述
|
|
16
|
+
|
|
17
|
+
使用反检测浏览器操作抖音网页版。Profile 名称: `douyin`。
|
|
18
|
+
|
|
19
|
+
## 前置条件
|
|
20
|
+
|
|
21
|
+
1. 首次使用需要用户登录抖音
|
|
22
|
+
2. 抖音支持手机号登录、扫码登录、第三方登录
|
|
23
|
+
3. 登录成功后保存 Cookie
|
|
24
|
+
|
|
25
|
+
## 操作流程
|
|
26
|
+
|
|
27
|
+
### 1. 首次登录设置
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
stealth-open douyin --no-headless
|
|
31
|
+
stealth-navigate https://www.douyin.com/ -p douyin
|
|
32
|
+
stealth-screenshot -p douyin
|
|
33
|
+
|
|
34
|
+
# 抖音通常弹出登录提示
|
|
35
|
+
# 手机号登录:
|
|
36
|
+
stealth-click 'text=手机号登录' -p douyin
|
|
37
|
+
stealth-wait 1 -p douyin
|
|
38
|
+
stealth-fill 'input[type="tel"]' '手机号' -p douyin
|
|
39
|
+
stealth-click 'button:contains("获取验证码")' -p douyin
|
|
40
|
+
stealth-wait-manual "输入短信验证码" -t 300 -p douyin
|
|
41
|
+
|
|
42
|
+
# 或者直接等待用户扫码
|
|
43
|
+
stealth-wait-manual "抖音登录" -t 300 -p douyin
|
|
44
|
+
|
|
45
|
+
stealth-cookies save -p douyin
|
|
46
|
+
stealth-close douyin
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### 2. 浏览首页推荐
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
stealth-open douyin --no-headless
|
|
53
|
+
stealth-navigate https://www.douyin.com/ -p douyin
|
|
54
|
+
stealth-wait 5 -p douyin
|
|
55
|
+
stealth-screenshot -p douyin
|
|
56
|
+
stealth-content -p douyin
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 3. 搜索视频
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
stealth-navigate 'https://www.douyin.com/search/关键词' -p douyin
|
|
63
|
+
stealth-wait 5 -p douyin
|
|
64
|
+
stealth-content -p douyin
|
|
65
|
+
stealth-screenshot -p douyin
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### 4. 发布视频
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# 进入创作者中心
|
|
72
|
+
stealth-navigate https://creator.douyin.com/ -p douyin
|
|
73
|
+
stealth-wait 5 -p douyin
|
|
74
|
+
stealth-screenshot -p douyin
|
|
75
|
+
|
|
76
|
+
# 点击发布视频
|
|
77
|
+
stealth-click 'text=发布视频' -p douyin
|
|
78
|
+
stealth-wait 2 -p douyin
|
|
79
|
+
|
|
80
|
+
# 抖音网页版上传视频需要通过文件选择器
|
|
81
|
+
# 注意:网页版上传功能可能有限制
|
|
82
|
+
stealth-screenshot -p douyin
|
|
83
|
+
stealth-content -p douyin
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### 5. 查看个人主页
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
stealth-navigate https://www.douyin.com/ -p douyin
|
|
90
|
+
stealth-wait 3 -p douyin
|
|
91
|
+
stealth-click 'div[data-e2e="user-info"]' -p douyin
|
|
92
|
+
stealth-wait 3 -p douyin
|
|
93
|
+
stealth-content -p douyin
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### 6. 评论
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# 打开视频页面后
|
|
100
|
+
stealth-click 'div[data-e2e="feed-comment-icon"]' -p douyin
|
|
101
|
+
stealth-wait 1 -p douyin
|
|
102
|
+
stealth-fill 'input[data-e2e="comment-input"]' '评论内容...' -p douyin
|
|
103
|
+
stealth-click 'button:contains("发送")' -p douyin
|
|
104
|
+
stealth-wait 3 -p douyin
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## 抖音常用 URL
|
|
108
|
+
|
|
109
|
+
| 功能 | URL |
|
|
110
|
+
|---|---|
|
|
111
|
+
| 首页 | `https://www.douyin.com/` |
|
|
112
|
+
| 搜索 | `https://www.douyin.com/search/关键词` |
|
|
113
|
+
| 创作者中心 | `https://creator.douyin.com/` |
|
|
114
|
+
| 数据中心 | `https://creator.douyin.com/data` |
|
|
115
|
+
| 热榜 | `https://www.douyin.com/hot` |
|
|
116
|
+
|
|
117
|
+
## 重要提示
|
|
118
|
+
|
|
119
|
+
1. 抖音网页版功能有限,部分操作(如发布视频)可能需要创作者中心
|
|
120
|
+
2. 抖音对自动化操作检测严格,反检测浏览器必不可少
|
|
121
|
+
3. 上传视频需要处理文件选择器,可能需要使用 `stealth-eval` 执行 JS
|
|
122
|
+
4. 抖音页面使用大量前端框架渲染,元素加载需要充分等待
|
|
123
|
+
5. Cookie 过期较快,频繁操作时注意检查登录状态
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: site-gmail
|
|
3
|
+
description: |
|
|
4
|
+
Gmail 邮箱操作指南 — 使用反检测浏览器操作 Gmail,包括登录、收发邮件、搜索邮件、读取邮件内容等。
|
|
5
|
+
依赖 stealth browser (DrissionPage),使用独立 Profile: gmail
|
|
6
|
+
metadata:
|
|
7
|
+
category: site_operation
|
|
8
|
+
version: "1.30.0"
|
|
9
|
+
requires: ["stealth-browser"]
|
|
10
|
+
profile: "gmail"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Gmail 邮箱操作
|
|
14
|
+
|
|
15
|
+
## 概述
|
|
16
|
+
|
|
17
|
+
使用反检测浏览器操作 Gmail 邮箱。Profile 名称: `gmail`。
|
|
18
|
+
|
|
19
|
+
## 前置条件
|
|
20
|
+
|
|
21
|
+
1. 首次使用前,需要用户通过 `stealth-wait-manual` 手动完成 Google 登录(含验证码/2FA)
|
|
22
|
+
2. 登录成功后执行 `stealth-cookies save` 保存登录状态
|
|
23
|
+
3. 后续访问自动恢复登录态
|
|
24
|
+
|
|
25
|
+
## 操作流程
|
|
26
|
+
|
|
27
|
+
### 1. 首次登录设置
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
stealth-open gmail --no-headless
|
|
31
|
+
stealth-navigate https://accounts.google.com/signin -p gmail
|
|
32
|
+
stealth-screenshot -p gmail
|
|
33
|
+
|
|
34
|
+
# 填写账号密码(如果页面允许自动化填写)
|
|
35
|
+
stealth-fill 'input[type="email"]' 'user@gmail.com' -p gmail
|
|
36
|
+
stealth-click 'button:contains("下一步")' -p gmail
|
|
37
|
+
stealth-wait 'input[type="password"]' -p gmail
|
|
38
|
+
stealth-fill 'input[type="password"]' 'password' -p gmail
|
|
39
|
+
stealth-click 'button:contains("下一步")' -p gmail
|
|
40
|
+
|
|
41
|
+
# 如果出现验证码,等待用户手动操作
|
|
42
|
+
stealth-wait-manual "Google验证码或2FA" -t 300 -p gmail
|
|
43
|
+
|
|
44
|
+
# 登录成功后保存 Cookie
|
|
45
|
+
stealth-cookies save -p gmail
|
|
46
|
+
stealth-close gmail
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### 2. 读取收件箱邮件
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
stealth-open gmail --no-headless
|
|
53
|
+
stealth-navigate https://mail.google.com/mail/u/0/#inbox -p gmail
|
|
54
|
+
stealth-wait 'table[class="F cf zt"]' -t 15 -p gmail
|
|
55
|
+
stealth-screenshot -p gmail
|
|
56
|
+
stealth-content -p gmail
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 3. 搜索邮件
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
stealth-navigate 'https://mail.google.com/mail/u/0/#search/关键词' -p gmail
|
|
63
|
+
stealth-wait 3 -p gmail
|
|
64
|
+
stealth-screenshot -p gmail
|
|
65
|
+
stealth-content -p gmail
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### 4. 读取邮件详情
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# 点击邮件主题行打开邮件
|
|
72
|
+
stealth-click 'tr.zE:contains("邮件主题关键词")' -p gmail
|
|
73
|
+
stealth-wait 2 -p gmail
|
|
74
|
+
stealth-content -p gmail
|
|
75
|
+
stealth-screenshot -p gmail
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### 5. 发送邮件
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# 点击写邮件按钮
|
|
82
|
+
stealth-click 'div.T-I.T-I-KE.L3' -p gmail
|
|
83
|
+
stealth-wait 'textarea[name="to"]' -p gmail
|
|
84
|
+
|
|
85
|
+
# 填写收件人
|
|
86
|
+
stealth-fill 'textarea[name="to"]' 'recipient@example.com' -p gmail
|
|
87
|
+
|
|
88
|
+
# 填写主题
|
|
89
|
+
stealth-fill 'input[name="subjectbox"]' '邮件主题' -p gmail
|
|
90
|
+
|
|
91
|
+
# 填写正文
|
|
92
|
+
stealth-fill 'div[aria-label="邮件正文"]' '邮件正文内容' -p gmail
|
|
93
|
+
|
|
94
|
+
# 点击发送
|
|
95
|
+
stealth-click 'div.T-I.T-I-KE.L3:contains("发送")' -p gmail
|
|
96
|
+
stealth-wait 3 -p gmail
|
|
97
|
+
stealth-screenshot -p gmail
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### 6. 查看附件
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# 打开含附件的邮件后
|
|
104
|
+
stealth-content -p gmail
|
|
105
|
+
# 附件链接会出现在页面内容中
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Gmail 常用 URL
|
|
109
|
+
|
|
110
|
+
| 功能 | URL |
|
|
111
|
+
|---|---|
|
|
112
|
+
| 收件箱 | `https://mail.google.com/mail/u/0/#inbox` |
|
|
113
|
+
| 已发送 | `https://mail.google.com/mail/u/0/#sent` |
|
|
114
|
+
| 草稿箱 | `https://mail.google.com/mail/u/0/#drafts` |
|
|
115
|
+
| 垃圾邮件 | `https://mail.google.com/mail/u/0/#spam` |
|
|
116
|
+
| 搜索 | `https://mail.google.com/mail/u/0/#search/关键词` |
|
|
117
|
+
|
|
118
|
+
## 重要提示
|
|
119
|
+
|
|
120
|
+
1. Google 登录安全严格,首次登录大概率需要人工处理验证码/手机验证
|
|
121
|
+
2. 建议使用 `--no-headless` 有头模式,方便通过 VNC 观察和操作
|
|
122
|
+
3. Gmail 页面使用大量动态渲染,导航后需要 `stealth-wait` 等待元素加载
|
|
123
|
+
4. 如果 Cookie 失效,需要重新走登录流程
|
|
124
|
+
5. Google 可能检测到新设备/IP 并要求安全验证
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: site-mail139
|
|
3
|
+
description: |
|
|
4
|
+
139邮箱操作指南 — 使用反检测浏览器操作中国移动139邮箱,包括登录、收发邮件、搜索邮件等。
|
|
5
|
+
依赖 stealth browser (DrissionPage),使用独立 Profile: mail139
|
|
6
|
+
metadata:
|
|
7
|
+
category: site_operation
|
|
8
|
+
version: "1.30.0"
|
|
9
|
+
requires: ["stealth-browser"]
|
|
10
|
+
profile: "mail139"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# 139邮箱操作
|
|
14
|
+
|
|
15
|
+
## 概述
|
|
16
|
+
|
|
17
|
+
使用反检测浏览器操作中国移动139邮箱。Profile 名称: `mail139`。
|
|
18
|
+
|
|
19
|
+
## 前置条件
|
|
20
|
+
|
|
21
|
+
1. 首次使用需要用户登录139邮箱
|
|
22
|
+
2. 支持139手机号+密码、短信验证登录
|
|
23
|
+
3. 登录成功后保存 Cookie
|
|
24
|
+
|
|
25
|
+
## 操作流程
|
|
26
|
+
|
|
27
|
+
### 1. 首次登录设置
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
stealth-open mail139 --no-headless
|
|
31
|
+
stealth-navigate https://mail.10086.cn/ -p mail139
|
|
32
|
+
stealth-screenshot -p mail139
|
|
33
|
+
|
|
34
|
+
# 填写手机号和密码
|
|
35
|
+
stealth-fill 'input[name="UserName"]' '139xxxxx' -p mail139
|
|
36
|
+
stealth-fill 'input[name="Password"]' 'password' -p mail139
|
|
37
|
+
stealth-click 'input[type="submit"]' -p mail139
|
|
38
|
+
|
|
39
|
+
# 可能需要短信验证
|
|
40
|
+
stealth-wait-manual "139邮箱短信验证" -t 300 -p mail139
|
|
41
|
+
|
|
42
|
+
stealth-cookies save -p mail139
|
|
43
|
+
stealth-close mail139
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### 2. 读取收件箱
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
stealth-open mail139 --no-headless
|
|
50
|
+
stealth-navigate https://mail.10086.cn/ -p mail139
|
|
51
|
+
stealth-cookies load -p mail139
|
|
52
|
+
stealth-wait 5 -p mail139
|
|
53
|
+
stealth-screenshot -p mail139
|
|
54
|
+
stealth-content -p mail139
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### 3. 搜索邮件
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
stealth-navigate 'https://mail.10086.cn/rm/mailbox' -p mail139
|
|
61
|
+
stealth-wait 3 -p mail139
|
|
62
|
+
stealth-fill 'input[placeholder*="搜索"]' '搜索关键词' -p mail139
|
|
63
|
+
stealth-click 'button:contains("搜索")' -p mail139
|
|
64
|
+
stealth-wait 3 -p mail139
|
|
65
|
+
stealth-content -p mail139
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### 4. 发送邮件
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# 点击写邮件
|
|
72
|
+
stealth-click 'text=写邮件' -p mail139
|
|
73
|
+
stealth-wait 2 -p mail139
|
|
74
|
+
|
|
75
|
+
# 填写收件人
|
|
76
|
+
stealth-fill 'input[name="to"]' 'recipient@example.com' -p mail139
|
|
77
|
+
|
|
78
|
+
# 填写主题
|
|
79
|
+
stealth-fill 'input[name="subject"]' '邮件主题' -p mail139
|
|
80
|
+
|
|
81
|
+
# 填写正文
|
|
82
|
+
stealth-fill 'body#ComposeBody' '邮件正文内容...' -p mail139
|
|
83
|
+
|
|
84
|
+
# 发送
|
|
85
|
+
stealth-click 'text=发送' -p mail139
|
|
86
|
+
stealth-wait 3 -p mail139
|
|
87
|
+
stealth-screenshot -p mail139
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### 5. 读取邮件详情
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# 点击邮件列表中的邮件
|
|
94
|
+
stealth-click 'div.mailItem:contains("邮件主题")' -p mail139
|
|
95
|
+
stealth-wait 2 -p mail139
|
|
96
|
+
stealth-content -p mail139
|
|
97
|
+
stealth-screenshot -p mail139
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## 139邮箱常用 URL
|
|
101
|
+
|
|
102
|
+
| 功能 | URL |
|
|
103
|
+
|---|---|
|
|
104
|
+
| 登录页 | `https://mail.10086.cn/` |
|
|
105
|
+
| 收件箱 | `https://mail.10086.cn/rm/mailbox` |
|
|
106
|
+
| 已发送 | `https://mail.10086.cn/rm/sent` |
|
|
107
|
+
| 草稿箱 | `https://mail.10086.cn/rm/drafts` |
|
|
108
|
+
| 通讯录 | `https://mail.10086.cn/rm/contacts` |
|
|
109
|
+
|
|
110
|
+
## 重要提示
|
|
111
|
+
|
|
112
|
+
1. 139邮箱登录时可能需要短信验证码,使用 `stealth-wait-manual` 等待用户输入
|
|
113
|
+
2. 139邮箱页面结构相对传统,选择器较稳定
|
|
114
|
+
3. Cookie 有效期通常较长(几天到几周)
|
|
115
|
+
4. 139邮箱支持附件上传,可通过文件选择器操作
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: site-wechat-mp
|
|
3
|
+
description: |
|
|
4
|
+
微信公众号平台操作指南 — 使用反检测浏览器操作微信公众号后台,包括登录、发布图文、查看数据等。
|
|
5
|
+
依赖 stealth browser (DrissionPage),使用独立 Profile: wechat_mp
|
|
6
|
+
metadata:
|
|
7
|
+
category: site_operation
|
|
8
|
+
version: "1.30.0"
|
|
9
|
+
requires: ["stealth-browser"]
|
|
10
|
+
profile: "wechat_mp"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# 微信公众号平台操作
|
|
14
|
+
|
|
15
|
+
## 概述
|
|
16
|
+
|
|
17
|
+
使用反检测浏览器操作微信公众号后台管理平台。Profile 名称: `wechat_mp`。
|
|
18
|
+
|
|
19
|
+
## 前置条件
|
|
20
|
+
|
|
21
|
+
1. 首次使用需要用户**扫码登录**微信公众号后台
|
|
22
|
+
2. 微信公众号后台仅支持扫码登录,无法通过账号密码自动登录
|
|
23
|
+
3. 登录成功后保存 Cookie
|
|
24
|
+
4. Cookie 有效期通常为几小时到一天
|
|
25
|
+
|
|
26
|
+
## 操作流程
|
|
27
|
+
|
|
28
|
+
### 1. 首次登录设置(必须人工扫码)
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
stealth-open wechat_mp --no-headless
|
|
32
|
+
stealth-navigate https://mp.weixin.qq.com/ -p wechat_mp
|
|
33
|
+
stealth-screenshot -p wechat_mp
|
|
34
|
+
|
|
35
|
+
# 等待用户扫码登录
|
|
36
|
+
stealth-wait-manual "扫码登录微信公众号" -t 300 -p wechat_mp
|
|
37
|
+
|
|
38
|
+
# 登录成功后保存 Cookie
|
|
39
|
+
stealth-cookies save -p wechat_mp
|
|
40
|
+
stealth-screenshot -p wechat_mp
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### 2. 发布图文消息
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
stealth-open wechat_mp --no-headless
|
|
47
|
+
stealth-navigate https://mp.weixin.qq.com/ -p wechat_mp
|
|
48
|
+
stealth-cookies load -p wechat_mp
|
|
49
|
+
stealth-wait 3 -p wechat_mp
|
|
50
|
+
|
|
51
|
+
# 进入素材管理 -> 新建图文
|
|
52
|
+
stealth-click 'text=素材管理' -p wechat_mp
|
|
53
|
+
stealth-wait 2 -p wechat_mp
|
|
54
|
+
stealth-click 'text=新建图文' -p wechat_mp
|
|
55
|
+
stealth-wait 3 -p wechat_mp
|
|
56
|
+
|
|
57
|
+
# 填写标题
|
|
58
|
+
stealth-fill 'input#title' '文章标题' -p wechat_mp
|
|
59
|
+
|
|
60
|
+
# 填写作者(可选)
|
|
61
|
+
stealth-fill 'input#author' '作者名' -p wechat_mp
|
|
62
|
+
|
|
63
|
+
# 填写正文
|
|
64
|
+
# 微信编辑器使用 iframe 或 contenteditable div
|
|
65
|
+
stealth-click 'div#edui1_body' -p wechat_mp
|
|
66
|
+
stealth-fill 'div#edui1_body' '文章正文内容...' -p wechat_mp
|
|
67
|
+
|
|
68
|
+
# 保存并群发
|
|
69
|
+
stealth-screenshot -p wechat_mp
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### 3. 查看消息
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
stealth-navigate https://mp.weixin.qq.com/cgi-bin/message?t=message/list -p wechat_mp
|
|
76
|
+
stealth-wait 3 -p wechat_mp
|
|
77
|
+
stealth-content -p wechat_mp
|
|
78
|
+
stealth-screenshot -p wechat_mp
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### 4. 查看用户管理
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
stealth-navigate https://mp.weixin.qq.com/cgi-bin/contactmanagepage?t=user/index -p wechat_mp
|
|
85
|
+
stealth-wait 3 -p wechat_mp
|
|
86
|
+
stealth-content -p wechat_mp
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### 5. 查看数据统计
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
stealth-navigate https://mp.weixin.qq.com/cgi-bin/home?t=home/index -p wechat_mp
|
|
93
|
+
stealth-wait 3 -p wechat_mp
|
|
94
|
+
stealth-content -p wechat_mp
|
|
95
|
+
stealth-screenshot -p wechat_mp
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## 微信公众号常用 URL
|
|
99
|
+
|
|
100
|
+
| 功能 | URL |
|
|
101
|
+
|---|---|
|
|
102
|
+
| 首页 | `https://mp.weixin.qq.com/cgi-bin/home?t=home/index` |
|
|
103
|
+
| 消息管理 | `https://mp.weixin.qq.com/cgi-bin/message?t=message/list` |
|
|
104
|
+
| 素材管理 | `https://mp.weixin.qq.com/cgi-bin/appmsg?t=media/appmsg_edit` |
|
|
105
|
+
| 用户管理 | `https://mp.weixin.qq.com/cgi-bin/contactmanagepage?t=user/index` |
|
|
106
|
+
| 数据统计 | `https://mp.weixin.qq.com/cgi-bin/stats` |
|
|
107
|
+
| 设置 | `https://mp.weixin.qq.com/cgi-bin/settingpage?t=setting/index` |
|
|
108
|
+
|
|
109
|
+
## 重要提示
|
|
110
|
+
|
|
111
|
+
1. 微信公众号后台**仅支持扫码登录**,无法自动化输入账号密码
|
|
112
|
+
2. Cookie 有效期较短(几小时),可能需要频繁重新登录
|
|
113
|
+
3. 微信编辑器结构复杂,操作前务必截图确认
|
|
114
|
+
4. 群发操作有频率限制,每日 1 次服务号、多次订阅号
|
|
115
|
+
5. 敏感操作(群发/删除)可能需要管理员二次确认
|
|
116
|
+
6. 建议配合 `--no-headless` 和 VNC 使用,方便观察扫码页面
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: site-weibo
|
|
3
|
+
description: |
|
|
4
|
+
微博 操作指南 — 使用反检测浏览器操作新浪微博,包括登录、浏览、发微博、转发、评论等。
|
|
5
|
+
依赖 stealth browser (DrissionPage),使用独立 Profile: weibo
|
|
6
|
+
metadata:
|
|
7
|
+
category: site_operation
|
|
8
|
+
version: "1.30.0"
|
|
9
|
+
requires: ["stealth-browser"]
|
|
10
|
+
profile: "weibo"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# 微博操作
|
|
14
|
+
|
|
15
|
+
## 概述
|
|
16
|
+
|
|
17
|
+
使用反检测浏览器操作新浪微博。Profile 名称: `weibo`。
|
|
18
|
+
|
|
19
|
+
## 前置条件
|
|
20
|
+
|
|
21
|
+
1. 首次使用需要用户手动完成微博登录
|
|
22
|
+
2. 登录成功后保存 Cookie
|
|
23
|
+
3. 后续访问自动恢复登录态
|
|
24
|
+
|
|
25
|
+
## 操作流程
|
|
26
|
+
|
|
27
|
+
### 1. 首次登录设置
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
stealth-open weibo --no-headless
|
|
31
|
+
stealth-navigate https://passport.weibo.com/sso/signin -p weibo
|
|
32
|
+
stealth-screenshot -p weibo
|
|
33
|
+
|
|
34
|
+
# 微博支持多种登录方式(账号密码/手机/扫码)
|
|
35
|
+
# 账号密码登录:
|
|
36
|
+
stealth-fill 'input[name="username"]' 'username' -p weibo
|
|
37
|
+
stealth-fill 'input[name="password"]' 'password' -p weibo
|
|
38
|
+
stealth-click 'a[action-type="submit"]' -p weibo
|
|
39
|
+
|
|
40
|
+
# 可能需要验证码
|
|
41
|
+
stealth-wait-manual "微博验证码" -t 300 -p weibo
|
|
42
|
+
|
|
43
|
+
stealth-cookies save -p weibo
|
|
44
|
+
stealth-close weibo
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 2. 浏览首页
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
stealth-open weibo --no-headless
|
|
51
|
+
stealth-navigate https://weibo.com/ -p weibo
|
|
52
|
+
stealth-wait 5 -p weibo
|
|
53
|
+
stealth-screenshot -p weibo
|
|
54
|
+
stealth-content -p weibo
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### 3. 发布微博
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# 点击发微博按钮
|
|
61
|
+
stealth-click 'textarea.WB_feed_editor' -p weibo
|
|
62
|
+
stealth-wait 1 -p weibo
|
|
63
|
+
|
|
64
|
+
# 输入微博内容
|
|
65
|
+
stealth-fill 'textarea.WB_feed_editor' '微博内容...' -p weibo
|
|
66
|
+
stealth-wait 1 -p weibo
|
|
67
|
+
|
|
68
|
+
# 点击发布按钮
|
|
69
|
+
stealth-click 'a[action-type="publish"]' -p weibo
|
|
70
|
+
stealth-wait 3 -p weibo
|
|
71
|
+
stealth-screenshot -p weibo
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### 4. 转发微博
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
# 打开目标微博页面
|
|
78
|
+
stealth-navigate 'https://weibo.com/detail/微博ID' -p weibo
|
|
79
|
+
stealth-wait 3 -p weibo
|
|
80
|
+
|
|
81
|
+
# 点击转发
|
|
82
|
+
stealth-click 'a[action-type="fl_forward"]' -p weibo
|
|
83
|
+
stealth-wait 1 -p weibo
|
|
84
|
+
|
|
85
|
+
# 填写转发理由(可选)
|
|
86
|
+
stealth-fill 'textarea.WB_feed_editor' '转发理由...' -p weibo
|
|
87
|
+
|
|
88
|
+
# 确认转发
|
|
89
|
+
stealth-click 'a[action-type="forward"]' -p weibo
|
|
90
|
+
stealth-wait 3 -p weibo
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### 5. 评论
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
stealth-click 'a[action-type="fl_comment"]' -p weibo
|
|
97
|
+
stealth-wait 1 -p weibo
|
|
98
|
+
stealth-fill 'textarea.WB_feed_editor' '评论内容...' -p weibo
|
|
99
|
+
stealth-click 'a[action-type="comment"]' -p weibo
|
|
100
|
+
stealth-wait 3 -p weibo
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### 6. 搜索
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
stealth-navigate 'https://s.weibo.com/weibo?q=关键词' -p weibo
|
|
107
|
+
stealth-wait 5 -p weibo
|
|
108
|
+
stealth-content -p weibo
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### 7. 查看用户主页
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
stealth-navigate https://weibo.com/u/用户ID -p weibo
|
|
115
|
+
stealth-wait 3 -p weibo
|
|
116
|
+
stealth-content -p weibo
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## 微博常用 URL
|
|
120
|
+
|
|
121
|
+
| 功能 | URL |
|
|
122
|
+
|---|---|
|
|
123
|
+
| 首页 | `https://weibo.com/` |
|
|
124
|
+
| 热搜 | `https://s.weibo.com/top/summary` |
|
|
125
|
+
| 搜索 | `https://s.weibo.com/weibo?q=关键词` |
|
|
126
|
+
| 微博详情 | `https://weibo.com/detail/微博ID` |
|
|
127
|
+
| 个人主页 | `https://weibo.com/u/用户ID` |
|
|
128
|
+
| 超话 | `https://weibo.com/p/page/超话ID` |
|
|
129
|
+
|
|
130
|
+
## 重要提示
|
|
131
|
+
|
|
132
|
+
1. 微博有完善的反爬机制,建议使用 DrissionPage 反检测模式
|
|
133
|
+
2. 操作频率不要过高,避免被系统判定为机器行为
|
|
134
|
+
3. 微博页面元素经常变动,操作前务必截图确认当前页面结构
|
|
135
|
+
4. 微博可能弹出各种验证,使用 `stealth-wait-manual` 处理
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: site-x-com
|
|
3
|
+
description: |
|
|
4
|
+
X.com (Twitter) 操作指南 — 使用反检测浏览器操作 X.com,包括登录、浏览时间线、发推文、回复、点赞等。
|
|
5
|
+
依赖 stealth browser (DrissionPage),使用独立 Profile: x_com
|
|
6
|
+
metadata:
|
|
7
|
+
category: site_operation
|
|
8
|
+
version: "1.30.0"
|
|
9
|
+
requires: ["stealth-browser"]
|
|
10
|
+
profile: "x_com"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# X.com (Twitter) 操作
|
|
14
|
+
|
|
15
|
+
## 概述
|
|
16
|
+
|
|
17
|
+
使用反检测浏览器操作 X.com (Twitter)。Profile 名称: `x_com`。
|
|
18
|
+
|
|
19
|
+
## 前置条件
|
|
20
|
+
|
|
21
|
+
1. 首次使用需要用户手动完成 X.com 登录
|
|
22
|
+
2. 登录成功后保存 Cookie
|
|
23
|
+
3. 后续访问自动恢复登录态
|
|
24
|
+
|
|
25
|
+
## 操作流程
|
|
26
|
+
|
|
27
|
+
### 1. 首次登录设置
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
stealth-open x_com --no-headless
|
|
31
|
+
stealth-navigate https://x.com/i/flow/login -p x_com
|
|
32
|
+
stealth-screenshot -p x_com
|
|
33
|
+
|
|
34
|
+
# X.com 登录流程
|
|
35
|
+
stealth-fill 'input[autocomplete="username"]' 'username' -p x_com
|
|
36
|
+
stealth-click 'text=下一步' -p x_com
|
|
37
|
+
stealth-wait 'input[autocomplete="current-password"]' -p x_com
|
|
38
|
+
stealth-fill 'input[autocomplete="current-password"]' 'password' -p x_com
|
|
39
|
+
stealth-click 'text=登录' -p x_com
|
|
40
|
+
|
|
41
|
+
# 可能需要验证码
|
|
42
|
+
stealth-wait-manual "X.com验证" -t 300 -p x_com
|
|
43
|
+
|
|
44
|
+
stealth-cookies save -p x_com
|
|
45
|
+
stealth-close x_com
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### 2. 浏览首页时间线
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
stealth-open x_com --no-headless
|
|
52
|
+
stealth-navigate https://x.com/home -p x_com
|
|
53
|
+
stealth-wait 'article' -t 15 -p x_com
|
|
54
|
+
stealth-screenshot -p x_com
|
|
55
|
+
stealth-content -p x_com
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### 3. 发布推文
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
stealth-navigate https://x.com/compose/post -p x_com
|
|
62
|
+
|
|
63
|
+
# 点击发推文区域
|
|
64
|
+
stealth-click 'div[data-testid="tweetTextarea_0"]' -p x_com
|
|
65
|
+
stealth-wait 1 -p x_com
|
|
66
|
+
|
|
67
|
+
# 输入推文内容
|
|
68
|
+
stealth-fill 'div[data-testid="tweetTextarea_0"]' '推文内容...' -p x_com
|
|
69
|
+
stealth-wait 1 -p x_com
|
|
70
|
+
|
|
71
|
+
# 点击发送按钮
|
|
72
|
+
stealth-click 'button[data-testid="tweetButton"]' -p x_com
|
|
73
|
+
stealth-wait 3 -p x_com
|
|
74
|
+
stealth-screenshot -p x_com
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### 4. 回复推文
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# 先导航到目标推文页面
|
|
81
|
+
stealth-navigate 'https://x.com/用户名/status/推文ID' -p x_com
|
|
82
|
+
stealth-wait 'article' -t 10 -p x_com
|
|
83
|
+
|
|
84
|
+
# 点击回复框
|
|
85
|
+
stealth-click 'div[data-testid="tweetTextarea_0"]' -p x_com
|
|
86
|
+
stealth-fill 'div[data-testid="tweetTextarea_0"]' '回复内容...' -p x_com
|
|
87
|
+
|
|
88
|
+
# 发送回复
|
|
89
|
+
stealth-click 'button[data-testid="tweetButtonInline"]' -p x_com
|
|
90
|
+
stealth-wait 3 -p x_com
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### 5. 点赞/转推
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
# 点赞
|
|
97
|
+
stealth-click 'button[data-testid="like"]' -p x_com
|
|
98
|
+
|
|
99
|
+
# 转推
|
|
100
|
+
stealth-click 'button[data-testid="retweet"]' -p x_com
|
|
101
|
+
stealth-click 'div[role="menuitem"]:contains("转推")' -p x_com
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### 6. 搜索
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
stealth-navigate 'https://x.com/search?q=关键词&src=typed_query&f=top' -p x_com
|
|
108
|
+
stealth-wait 'article' -t 10 -p x_com
|
|
109
|
+
stealth-content -p x_com
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### 7. 查看用户资料
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
stealth-navigate https://x.com/用户名 -p x_com
|
|
116
|
+
stealth-wait 3 -p x_com
|
|
117
|
+
stealth-content -p x_com
|
|
118
|
+
stealth-screenshot -p x_com
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## X.com 常用 URL
|
|
122
|
+
|
|
123
|
+
| 功能 | URL |
|
|
124
|
+
|---|---|
|
|
125
|
+
| 首页时间线 | `https://x.com/home` |
|
|
126
|
+
| 发推文 | `https://x.com/compose/post` |
|
|
127
|
+
| 通知 | `https://x.com/notifications` |
|
|
128
|
+
| 消息 | `https://x.com/messages` |
|
|
129
|
+
| 搜索 | `https://x.com/search?q=关键词` |
|
|
130
|
+
| 用户资料 | `https://x.com/用户名` |
|
|
131
|
+
| 个人设置 | `https://x.com/settings/account` |
|
|
132
|
+
|
|
133
|
+
## 重要提示
|
|
134
|
+
|
|
135
|
+
1. X.com 对自动化检测较为严格,DrissionPage 反检测模式可降低风险
|
|
136
|
+
2. 发推文、点赞等操作不宜过于频繁,避免触发频率限制
|
|
137
|
+
3. X.com 页面频繁更新,data-testid 选择器可能变化,操作前先截图确认
|
|
138
|
+
4. 建议操作间隔 3-5 秒,模拟人类操作节奏
|
package/main.py
CHANGED
|
@@ -426,6 +426,27 @@ class MyAgentApp:
|
|
|
426
426
|
]:
|
|
427
427
|
self.skill_registry.register(skill_cls())
|
|
428
428
|
|
|
429
|
+
# ── 反检测浏览器技能 (DrissionPage — v1.30.0) ──
|
|
430
|
+
from aiskills.browser_stealth import (
|
|
431
|
+
StealthBrowserStartSkill, StealthBrowserNavigateSkill,
|
|
432
|
+
StealthBrowserClickSkill, StealthBrowserFillSkill,
|
|
433
|
+
StealthBrowserScreenshotSkill, StealthBrowserEvalSkill,
|
|
434
|
+
StealthBrowserGetContentSkill, StealthBrowserCookieSkill,
|
|
435
|
+
StealthBrowserCloseSkill, StealthBrowserWaitManualSkill,
|
|
436
|
+
StealthBrowserWaitSkill,
|
|
437
|
+
BrowserProfileListSkill, BrowserProfileCreateSkill, BrowserProfileDeleteSkill,
|
|
438
|
+
)
|
|
439
|
+
for skill_cls in [
|
|
440
|
+
StealthBrowserStartSkill, StealthBrowserNavigateSkill,
|
|
441
|
+
StealthBrowserClickSkill, StealthBrowserFillSkill,
|
|
442
|
+
StealthBrowserScreenshotSkill, StealthBrowserEvalSkill,
|
|
443
|
+
StealthBrowserGetContentSkill, StealthBrowserCookieSkill,
|
|
444
|
+
StealthBrowserCloseSkill, StealthBrowserWaitManualSkill,
|
|
445
|
+
StealthBrowserWaitSkill,
|
|
446
|
+
BrowserProfileListSkill, BrowserProfileCreateSkill, BrowserProfileDeleteSkill,
|
|
447
|
+
]:
|
|
448
|
+
self.skill_registry.register(skill_cls())
|
|
449
|
+
|
|
429
450
|
# ── [v1.22.0] 内置平台工具不再注册存根 ──
|
|
430
451
|
# command, recall_memory, file_send, playaudio, playvideo, web_control
|
|
431
452
|
# 由 ToolDispatcher 直接处理,其元数据通过 BUILTIN_TOOLS 常量
|