pytube.exceptions.VideoUnavailable on flagged but still accessible videos.

Created on 8 Oct 2018  路  4Comments  路  Source: pytube/pytube

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.

stale

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

All 4 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stephanemombuleau picture stephanemombuleau  路  19Comments

aklajnert picture aklajnert  路  23Comments

twwwy picture twwwy  路  54Comments

RONNCC picture RONNCC  路  20Comments

stdedos picture stdedos  路  24Comments