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

🎨 Improve 星光直播

-优化代码
This commit is contained in:
wbt5 2021-11-20 23:54:59 +08:00
parent 315ce05dd1
commit 41cb50bede
No known key found for this signature in database
GPG Key ID: 92D5C42E815A2BD6

View File

@ -11,7 +11,7 @@ class TuHo:
def get_real_url(self):
with requests.Session() as s:
res = s.get('https://www.tuho.tv/' + str(self.rid)).text
res = s.get(f'https://www.tuho.tv/{self.rid}').text
flv = re.search(r'videoPlayFlv":"(https[\s\S]+?flv)', res)
if flv:
status = re.search(r'isPlaying\s:\s(\w+),', res).group(1)