mirror of
https://github.com/wbt5/real-url.git
synced 2025-06-17 08:25:25 +08:00
添加UA
This commit is contained in:
parent
36f6764752
commit
50b3a3e81e
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user