From cd605348e9d6de4d5b4c841130e74093c33682df Mon Sep 17 00:00:00 2001 From: Jylpah Date: Mon, 24 Feb 2020 23:57:02 +0200 Subject: [PATCH] Deleted. Use upload_wotb_replays.py --- postwotreplay.py | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 postwotreplay.py diff --git a/postwotreplay.py b/postwotreplay.py deleted file mode 100644 index 0eb3058..0000000 --- a/postwotreplay.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/python3 - -import json, requests, sys, base64 - -filename = str(sys.argv[1]) - -#Change this to your own WG id. Find it here: https://api.wotblitz.eu/wotb/account/list/?account_id%2Cnickname -# WG account id of the uploader: -uploader_account_ID = 0 - -# edit this or use arg.parse() to add proper suppod for commandline arguments -title="Some title" -url='https://wotinspector.com/api/replay/upload?title=' + title + '&details=full&uploaded_by=' + str(uploader_account_ID) - -# additional option: 'private=1' to keep the replay way from public listing at WoTinspector.com/replays - -with open(filename,'rb') as f: - payload = {'file' : (filename, base64.b64encode(f.read()))} - r = requests.post(url, data=payload) - print(r.json()) \ No newline at end of file