mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-30 12:01:28 +00:00
[ie/tiktok:live] Fix room ID extraction (#10408)
Closes #10407 Authored by: mokrueger
This commit is contained in:
parent
04e17ba20a
commit
d2189d3d36
|
@ -1458,9 +1458,11 @@ def _real_extract(self, url):
|
||||||
|
|
||||||
if webpage:
|
if webpage:
|
||||||
data = self._get_sigi_state(webpage, uploader or room_id)
|
data = self._get_sigi_state(webpage, uploader or room_id)
|
||||||
room_id = (traverse_obj(data, ('UserModule', 'users', ..., 'roomId', {str_or_none}), get_all=False)
|
room_id = (
|
||||||
or self._search_regex(r'snssdk\d*://live\?room_id=(\d+)', webpage, 'room ID', default=None)
|
traverse_obj(data, ((
|
||||||
or room_id)
|
('LiveRoom', 'liveRoomUserInfo', 'user'),
|
||||||
|
('UserModule', 'users', ...)), 'roomId', {str}, any))
|
||||||
|
or self._search_regex(r'snssdk\d*://live\?room_id=(\d+)', webpage, 'room ID', default=room_id))
|
||||||
uploader = uploader or traverse_obj(
|
uploader = uploader or traverse_obj(
|
||||||
data, ('LiveRoom', 'liveRoomUserInfo', 'user', 'uniqueId'),
|
data, ('LiveRoom', 'liveRoomUserInfo', 'user', 'uniqueId'),
|
||||||
('UserModule', 'users', ..., 'uniqueId'), get_all=False, expected_type=str)
|
('UserModule', 'users', ..., 'uniqueId'), get_all=False, expected_type=str)
|
||||||
|
|
Loading…
Reference in a new issue