Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Support for deleted videos #126

Open
JackReevies opened this issue Jan 20, 2022 · 3 comments
Open

Support for deleted videos #126

JackReevies opened this issue Jan 20, 2022 · 3 comments

Comments

@JackReevies
Copy link

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

@TimeForANinja
Copy link
Owner

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);

🤔

@JackReevies
Copy link
Author

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

@TimeForANinja
Copy link
Owner

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"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants