X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fplayed.py;h=17880471d9d160f6d3315ca9c6eadeada8ce91a7;hb=be53e2a73734bfa3f0f5c0d0146b08e577a0b998;hp=645a1e06dc8f3678b30d4e41b38ea13396c7a3e0;hpb=76e7d1e74b10b99ed9289b0c30c5f4933f9d841e;p=youtube-dl diff --git a/youtube_dl/extractor/played.py b/youtube_dl/extractor/played.py index 645a1e06d..17880471d 100644 --- a/youtube_dl/extractor/played.py +++ b/youtube_dl/extractor/played.py @@ -6,6 +6,7 @@ import os.path from .common import InfoExtractor from ..utils import ( + ExtractorError, compat_urllib_parse, compat_urllib_request, ) @@ -29,6 +30,12 @@ class PlayedIE(InfoExtractor): video_id = self._match_id(url) orig_webpage = self._download_webpage(url, video_id) + + m_error = re.search( + r'(?s)Reason for deletion:.*?]*>(?P[^<]+)', orig_webpage) + if m_error: + raise ExtractorError(m_error.group('msg'), expected=True) + fields = re.findall( r'type="hidden" name="([^"]+)"\s+value="([^"]+)">', orig_webpage) data = dict(fields)