SuspiciousLookingOwl / youtubei

Get Youtube data such as videos, playlists, channels, video information & comments, related videos, up next video, and more!
https://suspiciouslookingowl.github.io/youtubei
MIT License
241 stars 50 forks source link

Add `MusicClient` #69

Closed SuspiciousLookingOwl closed 1 year ago

SuspiciousLookingOwl commented 1 year ago

Is your feature request related to a problem? Please describe. Music client (used on music.youtube.com) seems to have different search algorithm compared to youtube.com, and can be more suitable if you need to search for a music specifically, and not a video. It also has slightly faster search response compared to youtube.com (around 200-300ms faster)

Describe the solution you'd like Create a MusicClient with basic functionality like .search and .getMusic

import {Client, MusicClient} from "youtubei";

const client = new Client(); // YouTube Normal Client
const musicClient = new MusicClient(); // YouTube Music Client
SuspiciousLookingOwl commented 1 year ago

Added on https://github.com/SuspiciousLookingOwl/youtubei/commit/9b62e305e144ddba4dc10ddfd8dae7d07e937fec

With 2 API:

More API to come