1
0
mirror of https://github.com/wbt5/real-url.git synced 2025-07-30 05:20:31 +08:00
This commit is contained in:
wbt5 2020-09-12 09:38:19 +08:00
parent ddf7065176
commit d60a55fb68

View File

@ -8,10 +8,10 @@ import json
def get_real_url(rid):
try:
room_url = rid
header = {
headers = {
'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
response = requests.get(url=room_url, headers=headers).text
real_url = re.findall(r'playInfo":([\s\S]*?),"authStatus', response)[0]
# real_url = re.sub(r'\\u002F', '/', real_url)
except: