1
0
mirror of https://github.com/wbt5/real-url.git synced 2025-06-17 08:25:25 +08:00
This commit is contained in:
wbt5 2020-09-12 10:53:30 +08:00
parent 36f6764752
commit 50b3a3e81e

View File

@ -11,8 +11,11 @@ class IXiGua:
def get_real_url(self):
try:
headers = {
'user-agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:83.0) Gecko/20100101 Firefox/83.0'
}
room_url = self.rid
response = requests.get(url=room_url).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: