1
0
mirror of https://github.com/wbt5/real-url.git synced 2025-06-16 15:59:57 +08:00

优化代码

This commit is contained in:
wbt5 2021-11-07 20:43:43 +08:00
parent f26b0f4c03
commit e3b91d4c88
No known key found for this signature in database
GPG Key ID: 92D5C42E815A2BD6

3
2cq.py
View File

@ -10,7 +10,7 @@ class MHT:
def get_real_url(self):
with requests.Session() as s:
res = s.get('https://www.2cq.com/proxy/room/room/info?roomId={}&appId=1004'.format(self.rid))
res = s.get(f'https://www.2cq.com/proxy/room/room/info?roomId={self.rid}&appId=1004')
res = res.json()
if res['status'] == 1:
result = res['result']
@ -35,4 +35,3 @@ def get_real_url(rid):
if __name__ == '__main__':
r = input('输入棉花糖直播房间号:\n')
print(get_real_url(r))