playwright_config.js
1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Playwright 视频上传配置
```javascript
// config.js - 各平台配置
module.exports = {
douyin: {
name: '抖音',
entry: 'https://creator.douyin.com/creator-micro/video/upload',
fileInput: 'input[type="file"]',
titleInput: 'input[name="title"]',
descInput: 'textarea[name="description"]',
coverBtn: 'div:has-text("选择封面")]',
publishBtn: 'button:has-text("发布")]',
maxSize: '4GB',
formats: ['mp4', 'mov'],
waitForUpload: 30000,
},
xiaohongshu: {
name: '小红书',
entry: 'https://creator.xiaohongshu.com/creator/post',
fileInput: 'input[type="file"]',
titleInput: 'input[placeholder="标题"]',
descInput: 'div[editable="true"]',
topicInput: 'div:has-text("#")]',
maxSize: '1GB',
formats: ['mp4'],
waitForUpload: 25000,
},
weibo: {
name: '微博',
entry: 'https://weibo.com/upload',
fileInput: 'input[type="file"]',
titleInput: 'input[placeholder="标题"]',
descInput: 'textarea[placeholder="简介"]',
maxSize: '200MB',
formats: ['mp4', 'avi', 'mov'],
waitForUpload: 20000,
},
videocom: {
name: '视频号',
entry: 'https://channels.weixin.qq.com/platform/upload',
fileInput: 'input[type="file"]',
titleInput: 'input[name="title"]',
descInput: 'textarea[name="desc"]',
maxSize: '1GB',
formats: ['mp4', 'avi'],
waitForUpload: 30000,
},
};
```