Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- headers = {
- 'Accept': 'application/vnd.twitchtv.v5+json',
- 'Client-ID': '123456789',
- 'Authorization': 'OAuth 123456789123456789123456789',
- }
- data = [
- ('channel[status]', 'This is the stream title!'),
- ('channel[game]', 'The Legend of Zelda: A Link to the Past'),
- ]
- try:
- url = 'https://api.twitch.tv/kraken/channels/%s' % channelids[channel]
- response = requests.request('PUT', url, data=data, headers=headers)
- print((response.text, url))
- if response.status_code == 200:
- print("Success!")
- except Exception as e:
- print("EXCEPTION RAISED in reqeusts.request()")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement