问题描述
如何创建此请求(GuestData:{'UserID':1018189446}
)?
以下代码不起作用:
def follow(i):
#print(cookies[i])
#robloxpy.SetProxy(random.choice(proxies))
ses = requests.session()
#b = random.choice(proxies)
xd1 = i.replace('.ROBLOSECURITY=','')
ses.cookies['.ROBLOSECURITY'] = xd1
#g = cookies[i]
c = ses.get('https://www.roblox.com/mobileapi/userinfo',headers=headers,verify=False,timeout=5).json()
print(ses.cookies)
uid = c['UserID']
#ses.cookies['GuestData'] = uid
ses.get('http://httpbin.org/cookies')
ses.cookies['GuestData']['UserID'] = str(uid)
print(ses.cookies)
print(uid)
h = ses.post('https://friends.roblox.com/v1/users/1018189446/follow',headers={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/85.0.4183.121 Safari/537.36 OPR/71.0.3770.284'},verify=False)
print(h.text)
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)