Upgrade yt_dlp and download script
This commit is contained in:
@@ -3,6 +3,7 @@ from ..utils import ExtractorError, try_get
|
||||
|
||||
|
||||
class SaitosanIE(InfoExtractor):
|
||||
_WORKING = False
|
||||
IE_NAME = 'Saitosan'
|
||||
_VALID_URL = r'https?://(?:www\.)?saitosan\.net/bview.html\?id=(?P<id>[0-9]+)'
|
||||
_TESTS = [{
|
||||
@@ -46,15 +47,15 @@ class SaitosanIE(InfoExtractor):
|
||||
base += '&sid=' + sid
|
||||
|
||||
self._download_webpage(base, b_id, note='Polling socket')
|
||||
payload = '420["room_start_join",{"room_id":"%s"}]' % b_id
|
||||
payload = '%s:%s' % (len(payload), payload)
|
||||
payload = f'420["room_start_join",{{"room_id":"{b_id}"}}]'
|
||||
payload = f'{len(payload)}:{payload}'
|
||||
|
||||
self._download_webpage(base, b_id, data=payload, note='Polling socket with payload')
|
||||
response = self._download_socket_json(base, b_id, note='Polling socket')
|
||||
if not response.get('ok'):
|
||||
err = response.get('error') or {}
|
||||
raise ExtractorError(
|
||||
'%s said: %s - %s' % (self.IE_NAME, err.get('code', '?'), err.get('msg', 'Unknown')) if err
|
||||
'{} said: {} - {}'.format(self.IE_NAME, err.get('code', '?'), err.get('msg', 'Unknown')) if err
|
||||
else 'The socket reported that the broadcast could not be joined. Maybe it\'s offline or the URL is incorrect',
|
||||
expected=True, video_id=b_id)
|
||||
|
||||
@@ -70,5 +71,5 @@ class SaitosanIE(InfoExtractor):
|
||||
'formats': self._extract_m3u8_formats(m3u8_url, b_id, 'mp4', live=True),
|
||||
'thumbnail': m3u8_url.replace('av.m3u8', 'thumb'),
|
||||
'uploader': try_get(b_data, lambda x: x['broadcast_user']['name']), # same as title
|
||||
'is_live': True
|
||||
'is_live': True,
|
||||
}
|
||||
|
Reference in New Issue
Block a user