Skip to content

Instantly share code, notes, and snippets.

@Misterguruman
Created October 14, 2022 16:37
Show Gist options
  • Save Misterguruman/e1055f681c6485f3bcc918e685d88c9f to your computer and use it in GitHub Desktop.
Save Misterguruman/e1055f681c6485f3bcc918e685d88c9f to your computer and use it in GitHub Desktop.
A script written for a friend to write their Overwatch Rating to a text file to be read by OBS during stream
import requests
import json
def SRUpdate():
data = requests.get('https://ow-api.com/v1/stats/pc/us/REDACTED/profile').text
data = json.loads(data)
with open('starting_sr.txt', 'w') as f:
f.write(str(data['rating']))
f.close()
if __name__ == "__main__":
SRUpdate()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment