[tvigle] Capture error message
This commit is contained in:
parent
687cb3ad35
commit
15b74b94be
1 changed files with 8 additions and 0 deletions
|
@ -5,6 +5,7 @@ import re
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
|
ExtractorError,
|
||||||
float_or_none,
|
float_or_none,
|
||||||
int_or_none,
|
int_or_none,
|
||||||
parse_age_limit,
|
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']
|
title = item['title']
|
||||||
description = item.get('description')
|
description = item.get('description')
|
||||||
thumbnail = item.get('thumbnail')
|
thumbnail = item.get('thumbnail')
|
||||||
|
|
Loading…
Reference in a new issue