zas023 / JdBuyer

京东抢购自动下单助手,GUI 支持 Windows 和 macOS
4.16k stars 903 forks source link

下单接口修改之后返回结果为空:https://trade.jd.com/shopping/order/submitOrder.action #68

Open AnTi-anti opened 1 year ago

AnTi-anti commented 1 year ago

https://trade.jd.com/shopping/order/submitOrder.action
经过对网页重新进行分析, 发现下单接口改变了一点,下面是修改之后的代码,但是返回结果为空,请问是哪里出现了问题呢?烦请各大佬解答 image 修改后的代码如下

url = 'https://api.m.jd.com/api?appid=trade-jd-com-v5&loginType=3&client=pc&t=1689560295929&clientVersion=1.0.0&uuid=122270672.16892326965761823031145.1689232697.1689504308.1689559915.10&functionId=pc_trade_submitOrder&cthr=1'
data = {
    "overseaPurchaseCookies": "",
    "vendorRemarks": "[]",
    "submitOrderParam.sopNotPutInvoice": "false",
    "submitOrderParam.trackID": "TestTrackId",
    "presaleStockSign": "1",
    "submitOrderParam.ignorePriceChange": "0",
    "submitOrderParam.btSupport": "0",
    "submitOrderParam.eid": self.eid,
    "submitOrderParam.fp": self.fp,
    "submitOrderParam.jxj": "1",
    "submitOrderParam.zpjd": "1",
    "submitOrderParam.giftRemove": "0",
    "submitOrderParam.limitUserFlag": "67776"
}
headers = {
    'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
    'Host': 'trade.jd.com',
    "origin": "https://trade.jd.com",
    "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3",
    "Connection": "keep-alive",
    "x-requested-with":"XMLHttpRequest",
    "upgrade-insecure-requests": "1",
    "content-type": "application/x-www-form-urlencoded",
    "sec-fetch-user":"?1",
    'Referer': 'http://trade.jd.com/shopping/order/getOrderInfo.action',
    "Cookie": '; ''
}

resp = requests.post(url, params=data, headers=headers)
print(resp.status_code)
print(resp.text)
DeraDream commented 1 year ago

同问,楼主解决没

saildf commented 1 year ago

看着已经获取不到 self.eid 和 self.fp的值了

spring59 commented 1 year ago

大佬 这个查询详情的接口 你是咋替换的 ?https://item-soa.jd.com/getWareBusiness 这个接口,我找到替换的接口但是参数不知道怎么传

327078466 commented 11 months ago

已调整 目前可以使用

bobowang2017 commented 8 months ago

看着已经获取不到 self.eid 和 self.fp的值了

确实获取不到了

Shawn070 commented 8 months ago

大佬,请问这个办法有没有解决呢?我现在也是卡在这一步了

bobowang2017 commented 8 months ago

@Shawn070 是获取不到eid和pid吗

bobowang2017 commented 8 months ago

eid和pid可以自己随便找个商品模拟下单,在下单的接口抓包获取,eid和fp可以重复使用

spring59 commented 8 months ago

eid和pid可以自己随便找个商品模拟下单,在下单的接口抓包获取,eid和fp可以重复使用

接口都有加密 谁会逆向分析,学习学习

Shawn070 commented 8 months ago

eid 和 fp 都能拿到,就是狗东现在这个下单接口改了,和楼主说的一样,请求是正常返回的 200,但没有返回值,也没下单成功,我看了下单时还掉了几个报文加密的接口,不知道是不是和这些接口有关,还没时间看这些接口具体是干嘛用的

luodeCoding commented 6 months ago

eid 和 fp 都能拿到,就是狗东现在这个下单接口改了,和楼主说的一样,请求是正常返回的 200,但没有返回值,也没下单成功,我看了下单时还掉了几个报文加密的接口,不知道是不是和这些接口有关,还没时间看这些接口具体是干嘛用的

我这边也是遇到同样的问题,就猜测是下单接口做了调整,目前有什么解决方案吗

Shawn070 commented 6 months ago

放弃了,现在狗东接口请求频率限制得很死,稍微快点就不行了。试了下其他人的代码(没源码,python打包的exe),可以抢购,但是频繁请求也会直接挂掉。或者你也可以试一下油猴的抢购助手v2,这个也可以抢购

luodeCoding commented 6 months ago

放弃了,现在狗东接口请求频率限制得很死,稍微快点就不行了。试了下其他人的代码(没源码,python打包的exe),可以抢购,但是频繁请求也会直接挂掉。或者你也可以试一下油猴的抢购助手v2,这个也可以抢购

哦哦,好的谢谢,我这边就是一直卡在这里还以为是什么参数没对,还是风控那里没对,那现在确实卡的比较严了,哎,就是媳妇让给娃抢安全座椅,所以来看看能不能搞

spring59 commented 6 months ago

狗东的接口加密了,而且不定时的升级加密版本获取商品详情接口,得会些js逆向

liuweiGit commented 6 months ago

https://trade.jd.com/shopping/order/submitOrder.action 经过对网页重新进行分析, 发现下单接口改变了一点,下面是修改之后的代码,但是返回结果为空,请问是哪里出现了问题呢?烦请各大佬解答 image 修改后的代码如下

url = 'https://api.m.jd.com/api?appid=trade-jd-com-v5&loginType=3&client=pc&t=1689560295929&clientVersion=1.0.0&uuid=122270672.16892326965761823031145.1689232697.1689504308.1689559915.10&functionId=pc_trade_submitOrder&cthr=1'
data = {
  "overseaPurchaseCookies": "",
  "vendorRemarks": "[]",
  "submitOrderParam.sopNotPutInvoice": "false",
  "submitOrderParam.trackID": "TestTrackId",
  "presaleStockSign": "1",
  "submitOrderParam.ignorePriceChange": "0",
  "submitOrderParam.btSupport": "0",
  "submitOrderParam.eid": self.eid,
  "submitOrderParam.fp": self.fp,
  "submitOrderParam.jxj": "1",
  "submitOrderParam.zpjd": "1",
  "submitOrderParam.giftRemove": "0",
  "submitOrderParam.limitUserFlag": "67776"
}
headers = {
    'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
    'Host': 'trade.jd.com',
    "origin": "https://trade.jd.com",
    "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3",
    "Connection": "keep-alive",
  "x-requested-with":"XMLHttpRequest",
    "upgrade-insecure-requests": "1",
  "content-type": "application/x-www-form-urlencoded",
    "sec-fetch-user":"?1",
    'Referer': 'http://trade.jd.com/shopping/order/getOrderInfo.action',
    "Cookie": '; ''
}

resp = requests.post(url, params=data, headers=headers)
print(resp.status_code)
print(resp.text)

请求返回403