aboutsummaryrefslogtreecommitdiffstats
path: root/hypervideo_dl/extractor/toutv.py
diff options
context:
space:
mode:
Diffstat (limited to 'hypervideo_dl/extractor/toutv.py')
-rw-r--r--hypervideo_dl/extractor/toutv.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/hypervideo_dl/extractor/toutv.py b/hypervideo_dl/extractor/toutv.py
index f60c199..ced1224 100644
--- a/hypervideo_dl/extractor/toutv.py
+++ b/hypervideo_dl/extractor/toutv.py
@@ -1,7 +1,7 @@
import json
from .radiocanada import RadioCanadaIE
-from ..compat import compat_HTTPError
+from ..networking.exceptions import HTTPError
from ..utils import (
ExtractorError,
int_or_none,
@@ -52,8 +52,8 @@ class TouTvIE(RadioCanadaIE): # XXX: Do not subclass from concrete IE
'Content-Type': 'application/json;charset=utf-8',
})['access_token']
except ExtractorError as e:
- if isinstance(e.cause, compat_HTTPError) and e.cause.code == 401:
- error = self._parse_json(e.cause.read().decode(), None)['Message']
+ if isinstance(e.cause, HTTPError) and e.cause.status == 401:
+ error = self._parse_json(e.cause.response.read().decode(), None)['Message']
raise ExtractorError(error, expected=True)
raise
self._claims = self._call_api('validation/v2/getClaims')['claims']