projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
687cb3a
)
[tvigle] Capture error message
author
Sergey M․
<dstftw@gmail.com>
Wed, 3 Jun 2015 14:52:47 +0000
(20:52 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Wed, 3 Jun 2015 14:52:47 +0000
(20:52 +0600)
youtube_dl/extractor/tvigle.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/tvigle.py
b/youtube_dl/extractor/tvigle.py
index a856938885e1000e8da318ab7383ab50a911be52..aa07c82519848c43935c3c96e1160e82a4201f07 100644
(file)
--- a/
youtube_dl/extractor/tvigle.py
+++ b/
youtube_dl/extractor/tvigle.py
@@
-5,6
+5,7
@@
import re
from .common import InfoExtractor
from ..utils import (
from .common import InfoExtractor
from ..utils import (
+ ExtractorError,
float_or_none,
int_or_none,
parse_age_limit,
float_or_none,
int_or_none,
parse_age_limit,
@@
-63,6
+64,13
@@
class TvigleIE(InfoExtractor):
item = video_data['playlist']['items'][0]
item = video_data['playlist']['items'][0]
+ videos = item.get('videos')
+
+ error_message = item.get('errorMessage')
+ if not videos and error_message:
+ raise ExtractorError(
+ '%s returned error: %s' % (self.IE_NAME, error_message), expected=True)
+
title = item['title']
description = item.get('description')
thumbnail = item.get('thumbnail')
title = item['title']
description = item.get('description')
thumbnail = item.get('thumbnail')