diff options
author | Yen Chi Hsuan <[email protected]> | 2015-05-15 02:27:41 +0800 |
---|---|---|
committer | Yen Chi Hsuan <[email protected]> | 2015-05-15 02:28:41 +0800 |
commit | 12675275a1d2158fbe409361888569e4cb52ef07 (patch) | |
tree | 9a7c0a3b517b992ff6061a749411f0ee4f618d67 /youtube_dl/extractor/teamcoco.py | |
parent | 3a105f7b20e8a3f742ac86cc1a6b02935b831778 (diff) | |
download | youtube-dl-12675275a1d2158fbe409361888569e4cb52ef07.tar.gz youtube-dl-12675275a1d2158fbe409361888569e4cb52ef07.zip |
[teamcoco] Detect expired videos (#5626)
Diffstat (limited to 'youtube_dl/extractor/teamcoco.py')
-rw-r--r-- | youtube_dl/extractor/teamcoco.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/extractor/teamcoco.py b/youtube_dl/extractor/teamcoco.py index 410eb7d3a..56be52638 100644 --- a/youtube_dl/extractor/teamcoco.py +++ b/youtube_dl/extractor/teamcoco.py @@ -62,7 +62,9 @@ class TeamcocoIE(InfoExtractor): mobj = re.match(self._VALID_URL, url) display_id = mobj.group('display_id') - webpage = self._download_webpage(url, display_id) + webpage, urlh = self._download_webpage_handle(url, display_id) + if 'src=expired' in urlh.geturl(): + raise ExtractorError('This video is expired.', expected=True) video_id = mobj.group('video_id') if not video_id: |