Jump to content
McKay Development

python trade accept not working


Recommended Posts

Posted

 Hi guys, first of all i am sorry about my english. I try some trade offer accept without any library like "communitylink/tradeoffer/<tradeofferid/accept" but response either null or nothing please help me.

There is my code 

def test(trade_id: int):
  with requests.Session() as s:
    s.get(url="https://steamcommunity.com/tradeoffer/"+trade_id+"/accept/")
    sessionid = s.cookies.get("sessionid")
  param = {
    "sessionid": sessionid,
    "serverid": 1,
    "tradeofferid": trade_id
  }
  headers = {
    "referer": "https://steamcommunity.com/tradeoffer/"+trade_id+"/"
  }
  print (sessionid)
  response = requests.post("https://steamcommunity.com/tradeoffer/"+trade_id+"/accept",headers=headers,params=param)
  print (response.text)

test("4765101895")

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...