node-ytpl icon indicating copy to clipboard operation
node-ytpl copied to clipboard

Support For Mixes

Open 5punk opened this issue 7 years ago β€’ 8 comments

Every Time I Try to fetch the ids from a youtube mix list I get an error.

Error: Unable to find a id in RDFJJ8hWDXWGs
    at Object.exports.get_playlist_id

example: https://www.youtube.com/watch?v=dQLngV189IU&list=RDdQLngV189IU

5punk avatar Jan 11 '18 15:01 5punk

Mixes aren't handled like regular playlist's and there's also the problem with them being infinite scrollable...

TimeForANinja avatar Feb 12 '18 22:02 TimeForANinja

Hi, @TimeForANinja , is there any update on the Mix playlist now? I am trying to make a bot to download the video in the mix list. AFAIK the youtube-dl works with the mix link, while it seems that ytpl and ytdl-core still havent support it. So, is there anyway to achieve it? Thanks

yinkiu602 avatar Mar 12 '20 04:03 yinkiu602

Did some testing in https://github.com/TimeForANinja/node-ytpl/tree/mix_test feel free to try it, using ytpl.getMix(startVideoID, mixID, (err, data) => { /* do sth with data */ }) even thou calling the function twice already returns different results

the page usually used to resolve the playlist doesn't work for mixes 😞

TimeForANinja avatar Mar 12 '20 17:03 TimeForANinja

Wow, thanks for your help, will definitely try it when I have time :) Originally I didn't even know what youtube mix isπŸ˜‚, but after I tried to start coding my first discord bot, copying the mix link that worked on a python bot and trying to use it here...... and nothing! Nothing works πŸ˜‚πŸ˜‚. Let's see if this will work :) Even different results will be fine πŸ‘

yinkiu602 avatar Mar 13 '20 08:03 yinkiu602

The diffrence between mix playlist and normal one is that the mix's misses the author informations like avatar and name which failed for me, otherwise it works like a normal playlist and fetched all videos. try to go to a mix playlist and a normal one and you can see the difference.

joek85 avatar Jan 16 '21 16:01 joek85

The diffrence between mix playlist and normal one is that the mix's misses the author informations like avatar and name which failed for me, otherwise it works like a normal playlist and fetched all videos. try to go to a mix playlist and a normal one and you can see the difference.

That's not (always?) true take this for example you can see the mix on a video: https://www.youtube.com/watch?v=ozXb10fOi2A&list=RDozXb10fOi2A&start_radio=1&rv=ozXb10fOi2A but there is no underlying playlist: https://www.youtube.com/playlist?list=RDozXb10fOi2A

TimeForANinja avatar Jan 16 '21 19:01 TimeForANinja

You are right but in my case, i was fetching a playlist from YouTube music channel like this one: https://www.youtube.com/watch?v=91VRyTvjoX4&list=RDCLAK5uy_m5j6nB_IPvvtoiErZo8aUsj_8pcUHLqUQ&start_radio=1

however i inspected the mix div and i found this<div id="items" class="playlist-items yt-scrollbar-dark style-scope ytd-playlist-panel-renderer"><ytd-playlist-panel-video-renderer class="style-scope ytd-playlist-panel-renderer" lockup="" watch-color-update_="" id="playlist-items"><!--css-build:shady--> <a id="wc-endpoint" class="yt-simple-endpoint style-scope ytd-playlist-panel-video-renderer" href="/watch?v=ozXb10fOi2A&amp;list=RDozXb10fOi2A&amp;index=1">

maybe i can help with parsing the video items but maybe we will be limited to 25 videos but that's fine if we made this work.

EDIT: i think this issue is related to ytdl-core not this repo.

joek85 avatar Jan 16 '21 20:01 joek85

EDIT: i think this issue is related to ytdl-core not this repo.

yep, since we never pull the individual video page

would require some changes thou, since ytdl-core only parses the video id from the provided links and ignores all other querys like e.g. list=

TimeForANinja avatar Jan 17 '21 12:01 TimeForANinja