🌈 It's better late than never!
abeelan / jdseckill Goto Github PK
View Code? Open in Web Editor NEW京东茅台抢购(已无法使用)
License: GNU General Public License v3.0
京东茅台抢购(已无法使用)
License: GNU General Public License v3.0
参数能获取到,手机端模拟作者有思路吗
是怎么知道支付接口的 还有里面用_JdTdudfp获取参数是什么 有什么用
目前只能手机端购买
[ I 210201 11:06:35 seckill:225 ] 预约成功:https://www.jd.com/error2.aspx
[ I 210201 11:06:35 seckill:226 ] 预约成功,已获得抢购资格 / 您已成功预约过了,无需重复预约
[ I 210201 11:06:35 timer:65 ] 今天抢购时间已过,明天再来吧~
[ I 210201 11:06:35 seckill:239 ] 到达预设抢购时长,程序终止!
是获取秒杀初始化信息返回的结果,无法json化就代表是无货吗?还是其他地方?
最近抢总是获取初始化信息的地方抛异常,返回的是个html,也不知道什么情况
报错1:
C:\Users\Tin\Desktop\jdSeckill-main>python main.py
Traceback (most recent call last):
File "C:\Users\Tin\Desktop\jdSeckill-main\main.py", line 35, in <module
main()
File "C:\Users\Tin\Desktop\jdSeckill-main\main.py", line 12, in main
seckill = JdSecKill()
File "C:\Users\Tin\Desktop\jdSeckill-main\seckill.py", line 18, in __in
self.timer = Timer()
File "C:\Users\Tin\Desktop\jdSeckill-main\mytimer.py", line 23, in _in
self.diff_time = self.local_jd_time_diff()
File "C:\Users\Tin\Desktop\jdSeckill-main\mytimer.py", line 49, in loca
return self.local_time() - self.jd_time()
File "C:\Users\Tin\Desktop\jdSeckill-main\mytimer.py", line 37, in jd_t
js = json.loads(ret)
File "C:\Users\Tin\anaconda3\lib\json_init.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Users\Tin\anaconda3\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\Tin\anaconda3\lib\json\decoder.py", line 355, in raw_dec
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
原因1:
原有京东时间url现在不能用了,所以需要更改。
修改1:
url = 'https://a.jd.com//ajax/queryServerData.html'
改成
url = 'https://api.m.jd.com/client.action?functionId=queryMaterialProducts&client=wh5'
报错2:
C:\Users\Tin\Desktop\jdSeckill-main>python main.py
Traceback (most recent call last):
File "C:\Users\Tin\Desktop\jdSeckill-main\main.py", line 35, in <module
main()
File "C:\Users\Tin\Desktop\jdSeckill-main\main.py", line 12, in main
seckill = JdSecKill()
File "C:\Users\Tin\Desktop\jdSeckill-main\seckill.py", line 18, in __in
self.timer = Timer()
File "C:\Users\Tin\Desktop\jdSeckill-main\mytimer.py", line 26, in _in
self.diff_time = self.local_jd_time_diff()
File "C:\Users\Tin\Desktop\jdSeckill-main\mytimer.py", line 52, in loca
return self.local_time() - self.jd_time()
File "C:\Users\Tin\Desktop\jdSeckill-main\mytimer.py", line 40, in jd_t
js = json.loads(ret)
File "C:\Users\Tin\anaconda3\lib\json_init.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Users\Tin\anaconda3\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
Traceback (most recent call last):
File "C:\Users\Tin\Desktop\jdSeckill-main\main.py", line 35, in
main()
File "C:\Users\Tin\Desktop\jdSeckill-main\main.py", line 12, in main
seckill = JdSecKill()
File "C:\Users\Tin\Desktop\jdSeckill-main\seckill.py", line 18, in init
self.timer = Timer()
File "C:\Users\Tin\Desktop\jdSeckill-main\mytimer.py", line 26, in init
self.diff_time = self.local_jd_time_diff()
File "C:\Users\Tin\Desktop\jdSeckill-main\mytimer.py", line 53, in local_jd_time_diff
return self.local_time() - self.jd_time()
File "C:\Users\Tin\Desktop\jdSeckill-main\mytimer.py", line 42, in jd_time
return int(js["serverTime"])
KeyError: 'serverTime'
原因2:更改后的url,时间戳对应key值不再是'serverTime'
更改2:
return int(js["serverTime"])
改为
return int(js["currentTime2"])
加油作者
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.