← 返回
未分类

Music Recommender

Analyze NetEase Cloud Music (网易云音乐) playlist and recommend songs matching their taste. Use when user asks for music recommendations, wants a daily playlist,...
分析网易云音乐歌单,推荐符合用户口味的歌曲。适用于用户请求音乐推荐、想要每日歌单等场景。
geekfoxcharlie geekfoxcharlie 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 357
下载
💾 1
安装
1
版本
#latest

概述

Music Recommender

Analyze a user's NetEase Cloud Music playlist, profile their taste, and recommend songs with clickable Bilibili links (free, no membership required).

Workflow

Step 1 — Parse Playlist

Extract playlist ID from user's link. Supported formats:

  • https://music.163.com/playlist?id=XXXXX
  • https://music.163.com/#/playlist?id=XXXXX

Run the fetch script:

python3 {baseDir}/scripts/fetch_playlist.py <playlist_id> > /tmp/playlist_<id>.json

Output: JSON array of {name, artists, album} objects.

Step 2 — Analyze Taste

Read the JSON output. Profile the user's taste:

  1. Top artists — count occurrences, identify top 10-20
  2. Language mix — estimate Chinese/English/Japanese/Korean ratio from song titles
  3. Genre tags — infer from artists and song names (e.g. 气声唱法, 90s怀旧, indie folk, dream pop)
  4. Era — identify decade distribution
  5. Mood — upbeat/melancholic/dreamy/energetic based on song names and artists

Summarize the taste profile in 3-5 bullet points.

Step 3 — Recommend

Based on the taste profile, recommend 10 songs that:

  • Match the user's preferences (similar artists, genres, mood)
  • Are NOT already in their playlist
  • Are diverse — mix of Chinese and foreign, different sub-genres
  • Include both well-known and lesser-known picks

For each recommended song, search Bilibili for a playable link:

python3 {baseDir}/scripts/search_bilibili.py "<artist> <song> 官方MV"

Output: BV_ID|TITLE|URL

Step 4 — Format Output

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:

  • Use bold for section headers, NOT markdown links text
  • Put URL on its own line after the song name
  • Group by genre/language (华语/欧美/日语 etc.)
  • Keep descriptions short (5-10 words)

Step 5 — Record & De-duplicate

IMPORTANT: Only recommend ONCE per day. Before recommending:

  1. Check if today's recommendation file exists:

```

~/.openclaw/workspace/music-history/YYYY-MM-DD.json

```

If it exists, reply with today's list and say "今天已经推荐过了". Do NOT generate a new one.

  1. If not, load the full history to avoid repeats:

```bash

python3 {baseDir}/scripts/history.py show

```

This outputs all previously recommended songs across all days.

  1. When generating recommendations, exclude any song that appears in the history.
  1. After generating, save today's recommendations:

```bash

python3 {baseDir}/scripts/history.py save

```

Pipe in JSON array: [{"name":"...","artists":"...","bvid":"...","url":"..."}]

History Storage

~/.openclaw/workspace/music-history/
├── 2026-03-29.json
├── 2026-03-30.json
└── ...

Each file: JSON array of recommended songs for that day.

Step 6 — (Optional) Extra Save

If user wants to save elsewhere, offer to:

  • Write to Notion (Content Calendar or a Music DB)
  • Generate an HTML page in the workspace
  • Create a text file in the workspace

Notes

  • NetEase API endpoint: https://music.163.com/api/v6/playlist/detail?id=&n=1000
  • Required headers: User-Agent: Mozilla/5.0, Referer: https://music.163.com/, Cookie: os=pc;
  • Artist field is ar (not artists) in NetEase API response
  • Bilibili search API: https://api.bilibili.com/x/web-interface/search/all/v2?keyword=
  • Required headers for Bilibili: User-Agent: Mozilla/5.0, Referer: https://www.bilibili.com/
  • Default recommendation count: 10 songs
  • Always use Bilibili links (free, no membership) instead of NetEase links

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 06:57 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

life-service

Sonoscli

steipete
控制Sonos音箱(发现/状态/播放/音量/分组)
★ 55 📥 84,948
ai-agent

AIdent

geekfoxcharlie
在 AIdent.store(免费、开放的存在注册表)注册你的 AI 代理,一条命令即可获得永久 Ed25519 身份并发送心跳证明存活,...
★ 0 📥 495
life-service

Caldav Calendar

asleep123
使用 vdirsyncer + khal 同步并查询 CalDAV 日历(iCloud、Google、Fastmail、Nextcloud 等)。适用于 Linux。
★ 243 📥 30,514