-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstatus.yaml
More file actions
56 lines (49 loc) · 1.53 KB
/
Copy pathstatus.yaml
File metadata and controls
56 lines (49 loc) · 1.53 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
51
52
53
54
55
56
site: suno
name: status
description: 查询歌曲生成状态
domain: suno.com
strategy: cookie
browser: true
args:
ids:
type: string
required: true
description: "歌曲 ID (多个 ID 用逗号分隔)"
columns: [id, status, title, audio_url, created_at]
pipeline:
- navigate: https://suno.com/create
- wait: 3
- evaluate: |
(async () => {
try {
const ids = "${{ args.ids }}";
let token = null;
if (window.Clerk && window.Clerk.session) {
token = await window.Clerk.session.getToken();
}
if (!token) throw new Error('JWT Token not found');
const response = await fetch(`https://studio-api.prod.suno.com/api/feed/?ids=${ids}`, {
headers: { 'Authorization': `Bearer ${token}` }
});
if (!response.ok) {
throw new Error(`Suno status check failed: ${response.status}`);
}
const data = await response.json();
if (!data || !Array.isArray(data)) return [];
return data.map(item => ({
id: item.id,
status: item.status,
title: item.title || 'Untitled',
audio_url: item.audio_url || '',
created_at: item.created_at
}));
} catch (e) {
return [{ id: 'error', status: 'error', title: e.message }];
}
})()
- map:
id: ${{ item.id }}
status: ${{ item.status }}
title: ${{ item.title }}
audio_url: ${{ item.audio_url }}
created_at: ${{ item.created_at }}