TimeForANinja/node-ytpl

Support for deleted videos

JackReevies opened this issue · 3 comments

When viewing playlists in youtube, there's an option to "show unavailable videos", they show up as "deleted video" but still have their old id. My program caches videos in case they get removed from the platform, and in the case of an unavailable video, it looks up cache by the video's id. I would love it if ytpl had an option to also show removed videos in the playlist response

looks like all you need to do is modifying this line https://github.com/TimeForANinja/node-ytpl/blob/master/lib/main.js#L100
to look sth like this

const json = await UTIL.doPost(BASE_API_URL + apiKey, { context, continuation: token, params: 'wgYCCAA%3D' }, opts.requestOptions);

🤔

Thanks, I tried this, expecting it to only get some deleted videos, but it didn't grab any from it. I've been using https://www.youtube.com/playlist?list=PLw0UrUlz9vFpjaXKphZW53TDTMgB8INpM to test with, there are a fair few deleted videos here scattered throughout

ok, little update on this
we currently do web-scraping for the first 100 results and use the youtubei api for everything following
the webscraping does not support deleted videos, so we would have to switch to the youtubei api for all information
with that api all that's needed is

browseId: "VL" + plistID
params: "wgYCCAA%3D" || "wgYCCAE%3D"