This commit is contained in:
c-basalt 2024-08-11 04:36:38 -04:00
parent d9fd3dbdfa
commit 388dc541da

View file

@ -181,7 +181,7 @@ class RPlayVideoIE(RPlayBaseIE):
if traverse_obj(video_info, ('viewableTiers', 'free')): if traverse_obj(video_info, ('viewableTiers', 'free')):
msg = 'This video requires a free subscription to access' msg = 'This video requires a free subscription to access'
if not self.user_id: if not self.user_id:
# browser credential is stored in localStorage # credential is in browser localStorage only, no cookies to use
msg += f'. {self._login_hint(method="password")}' msg += f'. {self._login_hint(method="password")}'
raise ExtractorError(msg, expected=True) raise ExtractorError(msg, expected=True)
@ -219,7 +219,7 @@ class RPlayUserIE(InfoExtractor):
}, },
'playlist_mincount': 35, 'playlist_mincount': 35,
}, { }, {
'url': 'https://rplay.live/c/furachi?page=contents', 'url': 'https://rplay.live/c/furachi',
'info_dict': { 'info_dict': {
'id': '65e07e60850f4527aab74757', 'id': '65e07e60850f4527aab74757',
'title': '逢瀬ふらち OuseFurachi', 'title': '逢瀬ふらち OuseFurachi',
@ -229,11 +229,9 @@ class RPlayUserIE(InfoExtractor):
def _real_extract(self, url): def _real_extract(self, url):
user_id, short = self._match_valid_url(url).group('id', 'short') user_id, short = self._match_valid_url(url).group('id', 'short')
key = 'customUrl' if short == 'c' else 'userOid'
user_info = self._download_json('https://api.rplay.live/account/getuser', user_id, query={ user_info = self._download_json('https://api.rplay.live/account/getuser', user_id, query={
key: user_id, 'filter[]': ['nickname', 'published', 'publishedClips'], 'customUrl' if short == 'c' else 'userOid': user_id, 'options': '{"includeContentMetadata":true}'})
'options': '{"includeContentMetadata":true}'})
replays = self._download_json( replays = self._download_json(
'https://api.rplay.live/live/replays', user_id, query={'creatorOid': user_info.get('_id')}) 'https://api.rplay.live/live/replays', user_id, query={'creatorOid': user_info.get('_id')})
@ -278,11 +276,11 @@ class RPlayLiveIE(RPlayBaseIE):
def _real_extract(self, url): def _real_extract(self, url):
user_id, short = self._match_valid_url(url).group('id', 'short') user_id, short = self._match_valid_url(url).group('id', 'short')
if short == 'c': user_info = self._download_json('https://api.rplay.live/account/getuser', user_id, query={
user_info = self._download_json(f'https://api.rplay.live/account/getuser?customUrl={user_id}', user_id) 'customUrl' if short == 'c' else 'userOid': user_id})
user_id = user_info['_id'] if user_info.get('isLive') is False:
else: raise UserNotLive
user_info = self._download_json(f'https://api.rplay.live/account/getuser?userOid={user_id}', user_id) user_id = user_info['_id']
live_info = self._download_json('https://api.rplay.live/live/play', user_id, query={'creatorOid': user_id}) live_info = self._download_json('https://api.rplay.live/live/play', user_id, query={'creatorOid': user_id})