mirror of
https://github.com/wbt5/real-url.git
synced 2025-07-25 18:11:43 +08:00
⚡ 优化代码
This commit is contained in:
parent
f26b0f4c03
commit
e3b91d4c88
3
2cq.py
3
2cq.py
@ -10,7 +10,7 @@ class MHT:
|
|||||||
|
|
||||||
def get_real_url(self):
|
def get_real_url(self):
|
||||||
with requests.Session() as s:
|
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()
|
res = res.json()
|
||||||
if res['status'] == 1:
|
if res['status'] == 1:
|
||||||
result = res['result']
|
result = res['result']
|
||||||
@ -35,4 +35,3 @@ def get_real_url(rid):
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
r = input('输入棉花糖直播房间号:\n')
|
r = input('输入棉花糖直播房间号:\n')
|
||||||
print(get_real_url(r))
|
print(get_real_url(r))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user