Using Pytube with a bunch of videos, i stumble accross a frustrating point where an error is raised because one of the videos I'm working with is flagged as inappropriate by Youtube users.
This one for instance :
https://www.youtube.com/watch?v=bDKSb76Tvds
is raising this error : "pytube.exceptions.VideoUnavailable: This video is unavailable."
Before I find a way to escape this kind of vids, is there something I'm missing ? Is this behaviour from Pytube intentional or is it a bug/mishap ?
Thanks.
And thanks for this neat lib.
Is there a graceful way to handle this when pulling a whole playlist using download_all? Otherwise, we abandon the entire playlist when we could only skip the one video.
Hey, for what is worth, the issue seems to be here.
That line seems to be checking for a substring in the html that doesn't seem to be present in age restricted videos (maybe it used to be), hence it raises a VideoUnavailable exception.
The substring being searched for is: <img class="icon meh" src="/yts/img
Then, How can I deal with this problem? Thank you in advance.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
Hey, for what is worth, the issue seems to be here.
That line seems to be checking for a substring in the html that doesn't seem to be present in age restricted videos (maybe it used to be), hence it raises a VideoUnavailable exception.
The substring being searched for is:
<img class="icon meh" src="/yts/img