1
0
mirror of https://github.com/wbt5/real-url.git synced 2025-07-24 09:33:13 +08:00

🐛 Fix twitch

Update twitch.py
This commit is contained in:
乌帮图 2022-07-23 14:58:35 +08:00 committed by GitHub
commit f1affeda8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,7 +23,7 @@ class Twitch:
def get_client_id(self): def get_client_id(self):
try: try:
res = self.s.get(f'https://www.twitch.tv/{self.rid}').text res = self.s.get(f'https://www.twitch.tv/{self.rid}').text
client_id = re.search(r'"Client-ID":"(.*?)"', res).group(1) client_id = re.search(r'clientId="(.*?)"', res).group(1)
return client_id return client_id
except requests.exceptions.ConnectionError: except requests.exceptions.ConnectionError:
raise Exception('ConnectionError') raise Exception('ConnectionError')