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

Update twitch.py

Client-ID 改成 clientId
This commit is contained in:
ysex 2022-05-31 11:51:39 +08:00 committed by GitHub
parent 8b7635d2fc
commit 4b2c4d5258
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):
try:
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
except requests.exceptions.ConnectionError:
raise Exception('ConnectionError')