Created
March 24, 2021 22:56
-
-
Save jseiser/1b42f103de868b51924e3fddac5471fa to your computer and use it in GitHub Desktop.
Get URLS of Ball Chase Rocket League Replays by Certain Pros
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 | |
headers = {'Authorization': 'TOKEN_HERE'} | |
payload = {'playlist': 'ranked-duels', 'pro': 'true'} | |
r = requests.get('https://ballchasing.com/api/replays', params=payload, headers=headers) | |
jsonResponse = r.json() | |
PROS = ['AYYJAY', 'Daniel', 'Wizz'] | |
for replay in jsonResponse['list']: | |
blue = replay['blue']['players'][0]['name'] | |
orange = replay['orange']['players'][0]['name'] | |
if (blue in PROS) or (orange in PROS): | |
print("REPLAY: " + replay['link']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pip install requests