Not getting Playlist song list
@CodeDotJS Right now, I have faced an issue with getting the video list from playlist id (also use same in the description)
{ data: { name: '', playlist: [] } }
@lefuturiste can you please show me the code?
@CodeDotJS I'm using simply your description code with browserify module. It did work yesterday. but right now not.
ytlist(url, ['id', 'name', 'url']).then(res => { console.log(res.data); });
http://browserify.org/
Hi I have the same problem in my Code and on RunKit too
I can also confirm this, my theory is that the disable_polymer parameter is no longer working. I tried to tweak the selectors but in the HTML markup, the elements are no longer there. They are however in window.ytInitialData.
To fix it for my use case I created my own scraper here, the response is similar to this library, but the API is not: https://github.com/Aidurber/youtube-playlist-scraper
Most of the magic is here:
Since there are a number of users depending on this library, I think it would be easy enough to port/add a fallback to ytInitialData scraping.
But much like the DOM selectors, if YouTube decides to change the shape of the initialData object, the scraper will break. That's just the risk of relying on a third-party.
If it was working yesterday, must be a dodgy update, just downgrade your npm and it should work.