1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-01-23 17:33:11 +08:00

[npo] Raise an ExtractorError if the metadata server tells us the video is gone

This commit is contained in:
Jiří Helebrant 2017-12-15 01:39:03 +01:00
parent e7d3de675e
commit 92200c1b79

View File

@ -170,6 +170,9 @@ class NPOIE(NPOBaseIE):
transform_source=strip_jsonp,
)
if 'error' in metadata and metadata['code'] == 440:
raise ExtractorError('Video gone')
# For some videos actual video id (prid) is different (e.g. for
# http://www.omroepwnl.nl/video/fragment/vandaag-de-dag-verkiezingen__POMS_WNL_853698
# video id is POMS_WNL_853698 but prid is POW_00996502)