|
|
@ -1,4 +1,5 @@
|
|
|
|
from .common import InfoExtractor
|
|
|
|
from .common import InfoExtractor
|
|
|
|
|
|
|
|
from ..networking.exceptions import HTTPError
|
|
|
|
from ..utils import (
|
|
|
|
from ..utils import (
|
|
|
|
ExtractorError,
|
|
|
|
ExtractorError,
|
|
|
|
traverse_obj,
|
|
|
|
traverse_obj,
|
|
|
@ -110,8 +111,8 @@ class PixivSketchUserIE(PixivSketchBaseIE):
|
|
|
|
if not traverse_obj(data, 'is_broadcasting'):
|
|
|
|
if not traverse_obj(data, 'is_broadcasting'):
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
self._call_api(user_id, 'users/current.json', url, 'Investigating reason for request failure')
|
|
|
|
self._call_api(user_id, 'users/current.json', url, 'Investigating reason for request failure')
|
|
|
|
except ExtractorError as ex:
|
|
|
|
except ExtractorError as e:
|
|
|
|
if ex.cause and ex.cause.code == 401:
|
|
|
|
if isinstance(e.cause, HTTPError) and e.cause.status == 401:
|
|
|
|
self.raise_login_required(f'Please log in, or use direct link like https://sketch.pixiv.net/@{user_id}/1234567890', method='cookies')
|
|
|
|
self.raise_login_required(f'Please log in, or use direct link like https://sketch.pixiv.net/@{user_id}/1234567890', method='cookies')
|
|
|
|
raise ExtractorError('This user is offline', expected=True)
|
|
|
|
raise ExtractorError('This user is offline', expected=True)
|
|
|
|
|
|
|
|
|
|
|
|