Allow non-browser requests to upload Networks and create tests

This commit is contained in:
Andrew Grant committed 2022-05-19 08:16:10 -04:00
1 parent 5fde447ff0
commit c31a9a0b2d
4 files changed
+83

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
import requests
URL = 'http://chess.grantnet.us/scripts/'
FILENAME = ''
data = {
'engine' : '',
'name' : ''.
'username' : '',
'password' : '',
'action' : 'UPLOAD',
}
with open(FILENAME, 'rb') as file:
r = requests.post(URL, data=data, files={'netfile' : file})
print(r.text)