Created
April 21, 2017 17:50
-
-
Save crorella/32a4ca7b7539b371e23a4b1ca245b2aa to your computer and use it in GitHub Desktop.
This file contains hidden or 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 os | |
| import requests | |
| url = 'http://54.202.193.48/upload' | |
| headers = {} | |
| for root, dirs, files in os.walk("PATH TO YOUR REPLAY FOLDER", topdown=False): | |
| for name in files: | |
| if name.endswith('StormReplay'): | |
| path = os.path.join(root, name) | |
| files = {'replay': open(path, 'rb')} | |
| res = requests.post(url, files=files, headers=headers) | |
| print res |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment