import hashlib
from .common import InfoExtractor
-from ..utils import unified_strdate
+from ..utils import (
+ ExtractorError,
+ unified_strdate,
+)
class WatIE(InfoExtractor):
'upload_date': '20140816',
'duration': 2910,
},
+ 'skip': "Ce contenu n'est pas disponible pour l'instant.",
},
]
video_info = self.download_video_info(real_id)
+ error_desc = video_info.get('error_desc')
+ if error_desc:
+ raise ExtractorError(
+ '%s returned error: %s' % (self.IE_NAME, error_desc), expected=True)
+
geo_list = video_info.get('geoList')
country = geo_list[0] if geo_list else ''
video_url = self._download_webpage(
'http://www.wat.tv/get%s?token=%s&getURL=1&country=%s' % (webid, compute_token(webid), country),
real_id,
- 'Downloding %s video URL' % fmt[0],
+ 'Downloading %s video URL' % fmt[0],
'Failed to download %s video URL' % fmt[0],
False)
if not video_url: