Browse Source

[teamcoco] Detect expired videos (#5626)

master
Yen Chi Hsuan 9 years ago
parent
commit
12675275a1
1 changed files with 3 additions and 1 deletions
  1. 4
      youtube_dl/extractor/teamcoco.py

4
youtube_dl/extractor/teamcoco.py

@ -62,7 +62,9 @@ class TeamcocoIE(InfoExtractor):
mobj = re.match(self._VALID_URL, url) mobj = re.match(self._VALID_URL, url)
display_id = mobj.group('display_id') 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') video_id = mobj.group('video_id')
if not video_id: if not video_id:

Loading…
Cancel
Save