1
0
mirror of https://github.com/wbt5/real-url.git synced 2025-08-01 14:48:01 +08:00

Update douyu.py

This commit is contained in:
aka 2021-09-21 06:21:23 +08:00 committed by GitHub
parent 0ab2f21c74
commit 6fd8696c03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,7 +16,7 @@ class Douyu:
async with aiohttp.ClientSession() as session:
async with session.get('https://m.douyu.com/' + str(room_id)) as resp:
room_page = await resp.text()
room_id = re.findall(r'"rid":(\d{1,7})', room_page)[0]
room_id = re.findall(r'"rid":(\d{1,8})', room_page)[0]
reg_datas = []
data = f'type@=loginreq/roomid@={room_id}/'
s = pack('i', 9 + len(data)) * 2