from .common import InfoExtractor
-from ..compat import (
- compat_HTTPError,
- compat_str,
-)
+from ..compat import compat_str
+from ..networking.exceptions import HTTPError
from ..utils import (
extract_attributes,
try_get,
'validate': validate,
}))['tvplayer']['response']
except ExtractorError as e:
- if isinstance(e.cause, compat_HTTPError):
+ if isinstance(e.cause, HTTPError):
response = self._parse_json(
- e.cause.read().decode(), resource_id)['tvplayer']['response']
+ e.cause.response.read().decode(), resource_id)['tvplayer']['response']
raise ExtractorError(
'%s said: %s' % (self.IE_NAME, response['error']), expected=True)
raise
formats = self._extract_m3u8_formats(response['stream'], display_id, 'mp4')
- self._sort_formats(formats)
return {
'id': resource_id,