projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a105f7
)
[teamcoco] Detect expired videos (#5626)
author
Yen Chi Hsuan
<yan12125@gmail.com>
Thu, 14 May 2015 18:27:41 +0000
(
02:27
+0800)
committer
Yen Chi Hsuan
<yan12125@gmail.com>
Thu, 14 May 2015 18:28:41 +0000
(
02:28
+0800)
youtube_dl/extractor/teamcoco.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/teamcoco.py
b/youtube_dl/extractor/teamcoco.py
index 410eb7d3a1fa60acdc590066125a834b37f5c6e9..56be526383b590d9b00759400a269d5164beef2f 100644
(file)
--- 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: