GithubHelp home page GithubHelp logo

jd_maotai's Introduction

jd_maotai

抢京东茅台脚本,定时自动触发,自动预约,自动停止

小白信用 99.6,暂时还没抢到过,朋友 80 多抢到了一瓶,所以我感觉是跟信用分没啥关系,完全是看运气的。

Python 版本需要 >= 3.6

安装依赖

pip install requests

使用方法

  1. 浏览器打开:https://order.jd.com/center/list.action
  2. 没登录就登录
  3. F12 控制台 console 栏输入 console.log(_JdJrTdRiskFpInfo, _JdEid)
  4. 参数依次对应:
_JdJrTdRiskFpInfo => self._JdJrTdRiskFpInfo
_JdEid => self.eid
  1. 点击 F12 控制台 network 栏,刷新页面,找到 https://order.jd.com/center/list.action 的请求记录,把 Request Headers 里面 cookie 的值填到脚本里的 self.cookie
  2. 将获取的到的值按照上述对应关系,填入脚本中
  3. 修改抢购时间self.buy_time
  4. 运行脚本
python main.py
  1. 不出意外的话,你会收获这些信息,太难了...
{'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90016, 'skuId': 0, 'success': False}
{'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90016, 'skuId': 0, 'success': False}
{'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90016, 'skuId': 0, 'success': False}
{'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90016, 'skuId': 0, 'success': False}
{'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90008, 'skuId': 0, 'success': False}
{'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90008, 'skuId': 0, 'success': False}
{'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90016, 'skuId': 0, 'success': False}
{'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90016, 'skuId': 0, 'success': False}

写在最后

  1. 建议在 9:30 以后运行该脚本,防止期间 Cookie 失效,JD 的 Cookie 失效规则很奇葩
  2. 抢茅台完全看运气,这是真的,什么信用分,都是玄学

与 JD 服务器对时参考:https://github.com/huanghyw/jd_seckill

jd_maotai's People

Contributors

aruelius avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

jd_maotai's Issues

提示 'NoneType' object has no attribute 'get'

和京东服务器时差为:-1187
Traceback (most recent call last):
File "D:\SoftWare\jd_maotai-main\main.py", line 147, in
mt.main()
File "D:\SoftWare\jd_maotai-main\main.py", line 109, in main
if address_info.get("islogin") == "-1":
AttributeError: 'NoneType' object has no attribute 'get'

建议将 self.buy_time 改下自动识别当前日期

一直提示需要登录

已经按说明中把request header的cookie填入了,登出登入好几次,浏览器没问题,但程序一直提示需要登录。

怎么样使用

直接替换huanghyw 里面的main.py文件 还是这个文件下载 正常编译就好

支付密码填写

支付密码

如果你的账户中有可用的京券(注意不是东券)或 在上次购买订单中使用了京豆,

那么京东可能会在下单时自动选择京券支付 或 自动勾选京豆支付。

此时下单会要求输入六位数字的支付密码。请在下方配置你的支付密码,如 123456 。

如果没有上述情况,下方请留空。

payment_pwd = "131452"

请问这个脚本支付密码需要填写吗?需要的话位置在哪里?

这个问题怎么解决

和京东服务器时差为:172
Traceback (most recent call last):
File "E:/jd_maotai-main/main.py", line 147, in
mt.main()
File "E:/jd_maotai-main/main.py", line 108, in main
address_info = self.init_action()
File "E:/jd_maotai-main/main.py", line 38, in init_action
return r.json()
File "D:\anaconda\lib\site-packages\requests\models.py", line 898, in json
return complexjson.loads(self.text, **kwargs)
File "D:\anaconda\lib\json_init_.py", line 357, in loads
return _default_decoder.decode(s)
File "D:\anaconda\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "D:\anaconda\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.