-
What do you want to achieve?
I want to make it like a kind of auto-updater without needing to use Roblox studio to push a new update for my game -
What is the issue?
when I use the python code it tells me in the output
<Response [500]>
-
What solutions have you tried so far?
tried changing files to data won’t work and I’m stuck with this error I also tried debugging it with prints
here is the code that I’m using right now for the python script
import requests
cookie = 'cookie'
xsrf = ''
url = 'http://data.roblox.com/Data/Upload.ashx?assetid=ID'
authurl = 'https://auth.roblox.com/v2/logout'
userAgent = 'Roblox/WinInet'
myfiles = {'Baseplate.rbxlx': open('Baseplate.rbxlx', 'rb')}
def getXsrf():
xsrfRequest = requests.post(authurl, headers={
'User-Agent': userAgent
}, cookies={
'.ROBLOSECURITY': cookie
})
if xsrfRequest.headers['x-csrf-token']:
return xsrfRequest.headers['x-csrf-token']
else:
return ''
xsrf = getXsrf()
print(xsrf)
mainRequest = requests.post(url, headers={
'Content-Type': 'application/xml',
'User-Agent': userAgent,
'x-csrf-token': xsrf
}, cookies={
'.ROBLOSECURITY': cookie
}, files = myfiles)
print(mainRequest)