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

优化代码 AcFun直播

This commit is contained in:
wbt5 2021-11-08 22:35:00 +08:00
parent 662f59f442
commit cfebd57093
No known key found for this signature in database
GPG Key ID: 92D5C42E815A2BD6

View File

@ -32,7 +32,7 @@ class AcFun:
'did': 'H5_',
'acfun.api.visitor_st': visitor_st
}
data = 'authorId={}&pullStreamType=FLV'.format(self.rid)
data = f'authorId={self.rid}&pullStreamType=FLV'
res = s.post(url, params=params, data=data, headers=headers).json()
if res['result'] == 1:
data = res['data']
@ -58,4 +58,3 @@ def get_real_url(rid):
if __name__ == '__main__':
r = input('请输入AcFun直播房间号\n')
print(get_real_url(r))