#711 [youtube] unsupported DRM content error message

This commit is contained in:
auouymous 2019-12-25 01:07:02 -07:00 committed by Eric Le Lay
parent 42d4cbd87c
commit cce3ba90d8
1 changed files with 3 additions and 0 deletions

View File

@ -183,6 +183,9 @@ def get_real_download_url(url, preferred_fmt_ids=None):
fmt_id_url_map = sorted(find_urls(page), reverse=True)
if not fmt_id_url_map:
drm = re.search('%22cipher%22%3A', page)
if drm is not None:
raise YouTubeError('Unsupported DRM content found for video ID "%s"' % vid)
raise YouTubeError('No formats found for video ID "%s"' % vid)
# Default to the highest fmt_id if we don't find a match below