TimeForANinja / node-ytsr

Do anonymous YouTube search requests.
MIT License
284 stars 66 forks source link

Question: How to filter type:music ? #199

Closed MehmetAliKOCAL closed 6 months ago

MehmetAliKOCAL commented 1 year ago

I'm using node-ytsr in my youtube music clone app like this:

const ytsr = require("ytsr");

const filters1 = await ytsr.getFilters("unfazed"); const filter1 = filters1.get("Type").get("Music"); const options = { limit: 1, }; const searchResults = await ytsr(filter1.url, options);

But I get an error "500: Cannot read properties of undefined (reading 'url')"

When I search for types Video and Playlist, everything is fine. Aren't there type filters for songs or albums?

ttrreevvoorr commented 1 year ago

I don't see a filter option for Music on YouTube, only Video, Channel, Playlist, and Movie. Is there existing functionality you're trying to reproduce?

image

If it helps, I've been adding "audio" to my search terms to try and find music instead of music videos when searching for tracks. But if you know something about YouTube filtering that I haven't seen yet please share :D

stale[bot] commented 8 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.