Analyze a user's NetEase Cloud Music playlist, profile their taste, and recommend songs with clickable Bilibili links (free, no membership required).
Extract playlist ID from user's link. Supported formats:
https://music.163.com/playlist?id=XXXXXhttps://music.163.com/#/playlist?id=XXXXXRun the fetch script:
python3 {baseDir}/scripts/fetch_playlist.py <playlist_id> > /tmp/playlist_<id>.json
Output: JSON array of {name, artists, album} objects.
Read the JSON output. Profile the user's taste:
Summarize the taste profile in 3-5 bullet points.
Based on the taste profile, recommend 10 songs that:
For each recommended song, search Bilibili for a playable link:
python3 {baseDir}/scripts/search_bilibili.py "<artist> <song> 官方MV"
Output: BV_ID|TITLE|URL
Present the recommendations as a plain text list (NOT HTML/markdown links) for Telegram compatibility:
🎵 Vulpis 今日推荐歌单
**华语女声:**
1. 陈粒 — 奇妙能力歌
https://www.bilibili.com/video/BVxxxxx
2. ...
**欧美梦幻:**
6. ...
Rules for Telegram formatting:
textIMPORTANT: Only recommend ONCE per day. Before recommending:
```
~/.openclaw/workspace/music-history/YYYY-MM-DD.json
```
If it exists, reply with today's list and say "今天已经推荐过了". Do NOT generate a new one.
```bash
python3 {baseDir}/scripts/history.py show
```
This outputs all previously recommended songs across all days.
```bash
python3 {baseDir}/scripts/history.py save
```
Pipe in JSON array: [{"name":"...","artists":"...","bvid":"...","url":"..."}]
~/.openclaw/workspace/music-history/
├── 2026-03-29.json
├── 2026-03-30.json
└── ...
Each file: JSON array of recommended songs for that day.
If user wants to save elsewhere, offer to:
https://music.163.com/api/v6/playlist/detail?id=&n=1000 User-Agent: Mozilla/5.0, Referer: https://music.163.com/, Cookie: os=pc;ar (not artists) in NetEase API responsehttps://api.bilibili.com/x/web-interface/search/all/v2?keyword=User-Agent: Mozilla/5.0, Referer: https://www.bilibili.com/共 1 个版本