Created
October 14, 2022 16:37
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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