mirror of
https://github.com/wbt5/real-url.git
synced 2025-07-30 21:32:14 +08:00
Update ixigua.py
UA
This commit is contained in:
parent
c4ab4dfb71
commit
1bd979b521
@ -8,9 +8,12 @@ import json
|
|||||||
def get_real_url(rid):
|
def get_real_url(rid):
|
||||||
try:
|
try:
|
||||||
room_url = rid
|
room_url = rid
|
||||||
response = requests.get(url=room_url).text
|
header = {
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0'
|
||||||
|
}
|
||||||
|
response = requests.get(url=room_url, headers=header).text
|
||||||
real_url = re.findall(r'playInfo":([\s\S]*?),"authStatus', response)[0]
|
real_url = re.findall(r'playInfo":([\s\S]*?),"authStatus', response)[0]
|
||||||
real_url = re.sub(r'\\u002F', '/', real_url)
|
# real_url = re.sub(r'\\u002F', '/', real_url)
|
||||||
except:
|
except:
|
||||||
real_url = '直播间不存在或未开播'
|
real_url = '直播间不存在或未开播'
|
||||||
return real_url
|
return real_url
|
||||||
|
Loading…
x
Reference in New Issue
Block a user