← 返回
开发者工具 中文

YouTube Music

Manage YouTube Music library, playlists, and discovery via ytmusicapi.
使用 ytmusicapi 管理 YouTube Music 音乐库、播放列表及发现功能
gentrycopsy
开发者工具 clawhub v1.0.1 1 版本 99821.2 Key: 无需
★ 5
Stars
📥 2,691
下载
💾 143
安装
1
版本
#latest

概述

YTMusic Librarian

This skill uses the ytmusicapi Python library to interact with YouTube Music.

Prerequisites

  • Python 3.x
  • ytmusicapi package: pip install ytmusicapi
  • Authentication file (oauth.json or browser.json) in the skill folder.

Setup Instructions

  1. Install the library:

```bash

pip install ytmusicapi

```

  1. Generate Authentication (The "cURL Handshake"):
    • Open Microsoft Edge and visit music.youtube.com (ensure you are logged in).
    • Press F12 to open DevTools, go to the Network tab.
    • Click your Profile Icon -> Library on the page.
    • Look for a request named browse in the network list.
    • Right-click the browse request -> Copy -> Copy as cURL (bash).
    • Paste that cURL command into a file named headers.txt in the skill folder.
    • Run the following Python snippet to generate browser.json:

```python

from ytmusicapi.auth.browser import setup_browser

with open('headers.txt', 'r') as f:

setup_browser('browser.json', f.read())

```

  • Ensure browser.json is located in the skill folder.
  1. Verify:

```bash

python -c "from ytmusicapi import YTMusic; yt = YTMusic('browser.json'); print(yt.get_library_songs(limit=1))"

```

Workflows

Library Management

  • List songs/albums: yt.get_library_songs(), yt.get_library_albums()
  • Add/Remove: yt.rate_song(videoId, 'LIKE'), yt.edit_song_library_status(feedbackToken)

Playlist Management

  • Create: yt.create_playlist(title, description)
  • Add Tracks: yt.add_playlist_items(playlistId, [videoIds])
  • Remove Tracks: yt.remove_playlist_items(playlistId, [videoIds])

Metadata & Discovery

  • Get Lyrics: yt.get_lyrics(browseId)
  • Get Related: yt.get_watch_playlist(videoId) -> related

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-03-28 13:14 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,816
developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 68 📥 180,311
developer-tools

Agent Browser

matrixy
专为AI智能体优化的无头浏览器自动化CLI,支持无障碍树快照和基于引用的元素选择。
★ 427 📥 118,276