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
Age restricted video's not reporting error #317
Comments
Age restricted videos don't throw an error. Their info is still retrieved https://github.com/fent/node-ytdl-core/blob/master/test/irl-test.js#L10-L12 Can you clarify what you mean by your app freezing? Is no error or response given with age restricted videos? Is an error thrown but not caught? Is there a video you have where this happens? |
Hmm, the application that freezes has been referenced. The video (do not judge me): https://www.youtube.com/watch?v=Ggwn7htyBCs |
Hey there, I'm the developer of the app in question. It looks like the issue has to do with the player_response object returning as a string when I access an age restricted video. Typically it's returned as an array of objects but doesn't seem to be the case when attempting to view an age restricted video. Here are some snapshots if it helps. This is what is usually returned when a video is called. This is what is returned with an age restricted video. I can work around this issue in my application, but I figured it would be better if I mentioned it here for you to take a look at. Thanks again for the project, it's been a massive help. :) |
Hi, just published a fixed for this, v0.20.4. Please update and see if this fixes it for you. Nice app you have there btw :) |
Hi,
info.js
if (!body.includes('<div id="watch7-player-age-gate-content"')) { return callback(new Error(util.between(body, '<h1 id="unavailable-message" class="message">', '</h1>').trim())); }
This piece of code causes an application to freeze since it does not get a response.
if (!body.includes('class="subreason style-scope ytd-player-error-message-renderer"')) { return callback(new Error(util.between(body, '<h1 id="unavailable-message" class="message">', '</h1>').trim())); }
This resolves the issue, an error is thrown back, and i can use the application further.
Would it be possible to research this further? My locale is NL.
The text was updated successfully, but these errors were encountered: