-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature / YT] Detect member-only streams #6
Comments
Nah. yt-dlp does too much to simply replace, nuh-uh. Instead I found something interesting. Using the following command I can essentially select a specific stream to download using yt-dlp CLI:
I completely forgot that I set |
Okay. So I used the Looking at the returned info_dict of '/streams' URL of a channel with a live members-only stream and keys So I tried directly downloading meta-data of a member-only stream using it's exact URL (i.e https://youtube.com/watch?ID). It did not work and an error telling me "no video formats" was logged. I removed a bunch of options that suppress errors and was greeted with this: Attempting to download a normal non-members stream works though. Also removing the cookies file then attempting to download the members-only stream again tells me that this is a member-only stream or something. I am paraphrasing here because later I tried it again and now it gives me the same error as above regardless of whether a cookies file was passed or not. It still had no problem downloading non-member streams. I also tried using a VPS I rent as a proxy and still errors out. There is a yt-dlp plugin that allows authenticating using email and password but I don't know if this is safe as I am pretty sure you're breaking TOS and possibly risking a ban. Uhhhhh what to do. Requests just returns a bunch of Javascript functions (who would've thought) and there is (understandably) no documentation on InnerTube. Now still, using CLI yt-dlp we can download member-only streams (when a cookie file is passed to it) so I assume there is a way. Maybe if I specify the YouTubeBaseInfoExtractor or some complicated function that I can't understand we might get it working? |
I have not really tested anything today but thinking about it I think InnerTube could possibly be the key here. I have no idea how much data I can access through it though. Also, Streamlink can detect member-only streams. It does not give us any metadata but it does tell us that a protected-video exists - highly suggesting that it's a members-only stream. So technically I can detect members-only stream but I cannot tell you when it will start or if it has already started, only that it exists. Not really worth it imo. I wish I had the knowledge for this but I am no better than the average high school programmer. I will learn how this works eventually though, just gotta keep trying. |
Essentially we will be replacing yt-dlp with our own.. parser?
I am not quite sure how this is going to be implemented. See, we could simply use requests.get() and download the webpage and parse its content, or we could use the InnerTube API (which I have no idea how) to send requests for data, or whatever yt-dlp is doing (which I think is a combination of the two? Idk).
Which option is more realistic is the question. I will update this issue with my research.
The text was updated successfully, but these errors were encountered: