Steam 礼物接口
Steam 礼物接口
接口列表:
1.添加购物车
def add_cart_by_subid(self, subid, sessionid, snr= 1_6_4__420 , action= add_to_cart ):headers = {Accept: text/html,applic
Steam 礼物接口
接口列表:
1.添加购物车
def add_cart_by_subid(self, subid, sessionid, snr= 1_6_4__420 , action= add_to_cart ):headers = {Accept: text/html,application/xhtmlxml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b;q=0.9,Accept-Encoding: gzip, deflate, br,Accept-Language: zh-C,zh;q=0.9,Cache-Control: max-age=0,Connection: keep-alive,Content-Type: application/x-www-form-urlencoded,Host: store.steampowered,Origin: ,Pragma: no-cache,Referer: /subid,sec-ch-ua: ot A;Brand;v=99, Chromium;v=90, Google Chrome;v=90 ,sec-ch-ua-mobile: ?0,Sec-Fetch-Dest: document,Sec-Fetch-Mode: navigate,Sec-Fetch-Site: same-origin,Sec-Fetch-User: ?1,Upgrade-Insecure-Requests: 1,User-Agent: Mozilla/5.0 (Windows T 6.1; Win64; x64) AppleWebKit/57.6 (KHTML, like Gecko) Chrome/89.0.489.114 Safari/57.6,}url = / data = { snr : snr, action : action, subid : subid, originating_snr : 1_direct-navigation__ , sessionid : sessionid}print(data)ret = self.web_client.post(url=url, data=data, headers=headers)if ret.status_code == 200:return get( shoppingCartGID )return
2.确认购物车
def confirm_cart(self, gidShoppingCart, sessionid, GifteeAccountID, Country, ShippingCountry,PaymentMethod= steamaccount , abortPendingTransacti=0, bHasCardInfo=0, bIsGift=1,Gifteeame= nihao , Signature=nihao, Sentiment= 祝你好运 , GiftMessage= nihao ,bSaveBillingAddress=1, bUseRemainingSteamAccount=1, bPreAuthOnly=0,ScheduledSendOnDate=0, gidReplayOfTransID=-1):url = / headers = {Accept: text/javascript, text/html, application/xml, text/xml, */*,Accept-Encoding: gzip, deflate, br,Accept-Language: zh-C,zh;q=0.9,Cache-Control: no-cache,Connection: keep-alive,Content-Type: application/x-www-form-urlencoded; charset=UTF-8,Host: store.steampowered,Origin: ,Pragma: no-cache,Referer: /?purchasetype=gift&snr=1_8_4__50,sec-ch-ua: ot A;Brand;v=99, Chromium;v=90, Google Chrome;v=90 ,sec-ch-ua-mobile: ?0,Sec-Fetch-Dest: empty,Sec-Fetch-Mode: cors,Sec-Fetch-Site: same-origin,User-Agent: Mozilla/5.0 (Windows T 6.1; Win64; x64) AppleWebKit/57.6 (KHTML, like Gecko) Chrome/89.0.489.114 Safari/57.6,X-Prototype-Version: 1.7,X-Requested-With: XMLHttpRequest}data = { gidShoppingCart : str(gidShoppingCart), gidReplayOfTransID : gidReplayOfTransID, PaymentMethod : PaymentMethod, abortPendingTransacti : abortPendingTransacti, bHasCardInfo : bHasCardInfo, Cardumber : , CardExpirationYear : , CardExpirationMonth : , Firstame : , Lastame : , Address : , AddressTwo : , Country : Country, City : , State : , PostalCode : , Phone : , ShippingFirstame : , ShippingLastame : , ShippingAddress : , ShippingAddressTwo : , ShippingCountry : ShippingCountry, ShippingCity : , ShippingState : , ShippingPostalCode : , ShippingPhone : , bIsGift : bIsGift, GifteeAccountID : GifteeAccountID, GifteeEmail : , Gifteeame : Gifteeame, GiftMessage : GiftMessage, Sentiment : Sentiment, Signature : Signature, ScheduledSendOnDate : ScheduledSendOnDate, BankAccount : , BankCode : , BankIBA : , BankBIC : , TPBankID : , bSaveBillingAddress : bSaveBillingAddress, gidPaymentID : , bUseRemainingSteamAccount : bUseRemainingSteamAccount, bPreAuthOnly : bPreAuthOnly, sessionid : sessionid}ret = self.web_client.post(url=url, data=data, headers=headers)if ret.status_code == 200:print()ret = json.loads()if ret:if ret.get(success) == 1:return ret.get( transid )return
.确认价格
def get_final_price(self, transid, shopping_cart_gid):headers = {Accept: text/javascript, text/html, application/xml, text/xml, */*,Accept-Encoding: gzip, deflate, br,Accept-Language: zh-C,zh;q=0.9,Cache-Control: no-cache,Connection: keep-alive,Content-Type: application/x-www-form-urlencoded; charset=UTF-8,Host: store.steampowered,Origin: ,Pragma: no-cache,Referer: /?purchasetype=gift&snr=1_8_4__50,sec-ch-ua: ot A;Brand;v=99, Chromium;v=90, Google Chrome;v=90 ,sec-ch-ua-mobile: ?0,Sec-Fetch-Dest: empty,Sec-Fetch-Mode: cors,Sec-Fetch-Site: same-origin,User-Agent: Mozilla/5.0 (Windows T 6.1; Win64; x64) AppleWebKit/57.6 (KHTML, like Gecko) Chrome/89.0.489.114 Safari/57.6,X-Prototype-Version: 1.7,X-Requested-With: XMLHttpRequest}url = / params={ count : 1 , transid : transid, purchasetype : gift , microtxnid : -1 , cart : shopping_cart_gid, gidReplayOfTransID : -1 }ret = self.web_client.get(url=url, params=params, headers=headers)if ret.status_code == 200:print()return Truereturn False
4.确认交易
def confirm_transaction(self, transid, CardCVV2=one, browserInfo=one):url = / headers = {Accept: text/javascript, text/html, application/xml, text/xml, */*,Accept-Encoding: gzip, deflate, br,Accept-Language: zh-C,zh;q=0.9,Cache-Control: no-cache,Connection: keep-alive,Content-Type: application/x-www-form-urlencoded; charset=UTF-8,Host: store.steampowered,Origin: ,Pragma: no-cache,Referer: /?purchasetype=gift&snr=1_8_4__50,sec-ch-ua: ot A;Brand;v=99, Chromium;v=90, Google Chrome;v=90 ,sec-ch-ua-mobile: ?0,Sec-Fetch-Dest: empty,Sec-Fetch-Mode: cors,Sec-Fetch-Site: same-origin,User-Agent: Mozilla/5.0 (Windows T 6.1; Win64; x64) AppleWebKit/57.6 (KHTML, like Gecko) Chrome/89.0.489.114 Safari/57.6,X-Prototype-Version: 1.7,X-Requested-With: XMLHttpRequest}data = { transid : transid, CardCVV2 : , browserInfo : # {language:zh-C, javaEnabled:false,colorDepth:24,screenHeight:1080,screenWidth:1920}}print(data)ret = self.web_client.post(url=url, data=data, headers=headers)if ret.status_code == 200:try:print()ret = json.loads()if ret:if ret.get(success) == 22:return Trueexcept Exception as e:passreturn False
5.接受礼物
def accept_gift(self, sessionid, gidGift=2867067291116965):url = / gidGift /unpackheaders = {Accept: text/javascript, text/html, application/xml, text/xml, */*,Accept-Encoding: gzip, deflate, br,Accept-Language: zh-C,zh;q=0.9,Cache-Control: no-cache,Connection: keep-alive,Content-Type: application/x-www-form-urlencoded,Host: store.steampowered,Origin: ,Pragma: no-cache,Referer: /?purchasetype=gift&snr=1_8_4__50,sec-ch-ua: ot A;Brand;v=99, Chromium;v=90, Google Chrome;v=90 ,sec-ch-ua-mobile: ?0,Sec-Fetch-Dest: empty,Sec-Fetch-Mode: cors,Sec-Fetch-Site: same-origin,User-Agent: Mozilla/5.0 (Windows T 6.1; Win64; x64) AppleWebKit/57.6 (KHTML, like Gecko) Chrome/89.0.489.114 Safari/57.6,X-Prototype-Version: 1.7,X-Requested-With: XMLHttpRequest}data = { sessionid : sessionid}ret = self.web_client.post(url=url, data=data, headers=headers)if ret.status_code == 200:return Truereturn False
5.添加好友
def add_friend(self, sessionid, self_steam_id, side_steamid):url = headers = {Accept: application/json, text/plain, */*,Accept-Encoding: gzip, deflate, br,Accept-Language: zh-C,zh;q=0.9,Cache-Control: no-cache,Connection: keep-alive,Host: steamcommunity,Content-Length:76,Origin:,Referer: /self_steam_id/friends/add,#Content-Type:multipart/form-data; boundary=----WebKitFormBoundary7BU2HxGU91MWeQ4U,Sec-Fetch-Dest: empty,Sec-Fetch-Mode: cors,Sec-Fetch-Site: same-origin,User-Agent: Mozilla/5.0 (Windows T 6.1; Win64; x64) AppleWebKit/57.6 (KHTML, like Gecko) Chrome/89.0.489.114 Safari/57.6}data = { sessionID : sessionid, steamid : side_steamid, accept_invite : 0}print(data)#{invited: [76561199078240981], success: 1}ret = self.web_client.post(url=url, data=data, headers=headers)print()if ret.status_code == 200:ret = json.loads()status = ret.get( success )if status == 1:return Truereturn False
6.接受好友
def accept_friends(self, sessionid, self_steamid, side_steamid):url = /self_steamid/friends/actionprint(url)headers = {Accept: */*,Accept-Encoding: gzip, deflate, br,Accept-Language: zh-C,zh;q=0.9,Cache-Control: no-cache,Connection: keep-alive,Host: steamcommunity,Origin: ,Content-Type: application/x-www-form-urlencoded; charset=UTF-8,Referer: /self_steamid/friends/pending,Pragma: no-cache,Sec-Fetch-Dest: empty,Sec-Fetch-Mode: cors,Sec-Fetch-Site: same-origin,User-Agent: Mozilla/5.0 (Windows T 6.1; Win64; x64) AppleWebKit/57.6 (KHTML, like Gecko) Chrome/89.0.489.114 Safari/57.6}data = { sessionid : sessionid, steamid : self_steamid, ajax : 1, action : accept , steamids[] : side_steamid}# {success:1,rgCounts:{cFriendsPending:0,cFriendsBlocked:0,cFollowing:0,cGroupsPending:0,cFriends:1,cGroups:0,success:1}}print(data)ret = self.web_client.post(url=url, data=data, headers=headers)if ret.status_code == 200:print()# ret = json.loads()# status = ret.get( success )# if status == 1:return Truereturn False
#感谢您对电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格的认可,转载请说明来源于"电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格
上传时间: 2024-02-05 13:22:30
推荐阅读
留言与评论(共有 15 条评论) |
本站网友 王小平 | 29分钟前 发表 |
br | |
本站网友 蛔虫病 | 19分钟前 发表 |
return get( shoppingCartGID )return 2.确认购物车 def confirm_cart(self | |
本站网友 男人的jb | 9分钟前 发表 |
本站网友 鳞癣 | 8分钟前 发表 |
multipart/form-data; boundary=----WebKitFormBoundary7BU2HxGU91MWeQ4U | |
本站网友 成都理工大学工程技术 | 24分钟前 发表 |
same-origin | |
本站网友 两个男人玩一个女人 | 12分钟前 发表 |
headers=headers)if ret.status_code == 200 | |
本站网友 第七大道官网 | 19分钟前 发表 |
Sentiment | |
本站网友 51rr | 29分钟前 发表 |
Referer | |
本站网友 怀孕后注意事项 | 24分钟前 发表 |
Sec-Fetch-Mode | |
本站网友 抽脂吸脂 | 13分钟前 发表 |
action | |
本站网友 华光花园 | 1分钟前 发表 |
application/xhtmlxml | |
本站网友 华丰家具官网 | 14分钟前 发表 |
Host | |
本站网友 万网官网 | 22分钟前 发表 |
text/javascript | |
本站网友 煮豆燃豆萁 | 11分钟前 发表 |
deflate |