fork huanghyw/jd_seckill

Overview

Jd_Seckill

特别声明:

  • 本仓库发布的jd_seckill项目中涉及的任何脚本,仅用于测试和学习研究,禁止用于商业用途,不能保证其合法性,准确性,完整性和有效性,请根据情况自行判断。

  • 本项目内所有资源文件,禁止任何公众号、自媒体进行任何形式的转载、发布。

  • huanghyw 对任何脚本问题概不负责,包括但不限于由任何脚本错误导致的任何损失或损害.

  • 间接使用脚本的任何用户,包括但不限于建立VPS或在某些行为违反国家/地区法律或相关法规的情况下进行传播, huanghyw 对于由此引起的任何隐私泄漏或其他后果概不负责。

  • 请勿将jd_seckill项目的任何内容用于商业或非法目的,否则后果自负。

  • 如果任何单位或个人认为该项目的脚本可能涉嫌侵犯其权利,则应及时通知并提供身份证明,所有权证明,我们将在收到认证文件后删除相关脚本。

  • 以任何方式查看此项目的人或直接或间接使用jd_seckill项目的任何脚本的使用者都应仔细阅读此声明。huanghyw 保留随时更改或补充此免责声明的权利。一旦使用并复制了任何相关脚本或jd_seckill项目,则视为您已接受此免责声明。

  • 您必须在下载后的24小时内从计算机或手机中完全删除以上内容。

  • 本项目遵循GPL-3.0 License协议,如果本特别声明与GPL-3.0 License协议有冲突之处,以本特别声明为准。

您使用或者复制了本仓库且本人制作的任何代码或项目,则视为已接受此声明,请仔细阅读
您在本声明未发出之时点使用或者复制了本仓库且本人制作的任何代码或项目且此时还在使用,则视为已接受此声明,请仔细阅读

简介

通过我这段时间的使用(2020-12-12至2020-12-17),证实这个脚本确实能抢到茅台。我自己三个账号抢了四瓶,帮两个朋友抢了4瓶。 大家只要确认自己配置文件没有问题,Cookie没有失效,坚持下去总能成功的。

根据这段时间大家的反馈,除了茅台,其它不需要加购物车的商品也不能抢。具体原因还没有进行排查,应该是京东非茅台商品抢购流程发生了变化。
为了避免耽误大家的时间,先不要抢购非茅台商品。
等这个问题处理好了,会上线新版本。

暗中观察

根据12月14日以来抢茅台的日志分析,大胆推断再接再厉返回Json消息中resultCode与小白信用的关系。
这里主要分析出现频率最高的9001690008

样例JSON

{'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90016, 'skuId': 0, 'success': False}
{'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90008, 'skuId': 0, 'success': False}

数据统计

案例 小白信用 90016 90008 抢到耗时
张三 63.8 59.63% 40.37% 暂未抢到
李四 92.9 72.05% 27.94% 4天
王五 99.6 75.70% 24.29% 暂未抢到
赵六 103.4 91.02% 8.9% 2天

猜测

推测返回90008是京东的风控机制,代表这次请求直接失败,不参与抢购。
小白信用越低越容易触发京东的风控。

从数据来看小白信用与风控的关系大概每十分为一个等级,所以赵六基本上没有被拦截,李四和王五的拦截几率相近,张三的拦截几率最高。

风控放行后才会进行抢购,这时候用的应该是水库计数模型,假设无法一次性拿到所有数据的情况下来尽量的做到抢购成功用户的均匀分布,这样就和概率相关了。

综上,张三想成功有点困难,小白信用是100+的用户成功几率最大。

主要功能

  • 登陆京东商城(www.jd.com
    • 用京东APP扫码给出的二维码
  • 预约茅台
    • 定时自动预约
  • 秒杀预约后等待抢购
    • 定时开始自动抢购

运行环境

第三方库

  • 需要使用到的库已经放在requirements.txt,使用pip安装的可以使用指令
    pip install -r requirements.txt
  • 如果国内安装第三方库比较慢,可以使用以下指令进行清华源加速 pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/

使用教程

1. 推荐Chrome浏览器

2. 网页扫码登录,或者账号密码登录

3. 填写config.ini配置信息

(1)eidfp找个普通商品随便下单,然后抓包就能看到,这两个值可以填固定的

随便找一个商品下单,然后进入结算页面,打开浏览器的调试窗口,切换到控制台Tab页,在控制台中输入变量_JdTdudfp,即可从输出的Json中获取eidfp
不会的话参考原作者的issue https://github.com/zhou-xiaojun/jd_mask/issues/22

(2)sku_id,DEFAULT_USER_AGENT

sku_id已经按照茅台的填好。 cookies_string 现在已经不需要填写了 DEFAULT_USER_AGENT 可以用默认的。谷歌浏览器也可以浏览器地址栏中输入about:version 查看USER_AGENT替换

(3)配置一下时间

现在不强制要求同步最新时间了,程序会自动同步京东时间

但要是电脑时间快慢了好几个小时,最好还是同步一下吧

以上都是必须的.

tips: 在程序开始运行后,会检测本地时间与京东服务器时间,输出的差值为本地时间-京东服务器时间,即-50为本地时间比京东服务器时间慢50ms。 本代码的执行的抢购时间以本地电脑/服务器时间为准

(4)修改抢购瓶数

代码中默认抢购瓶数为2,且无法在配置文件中修改 如果一个月内抢购过一瓶,最好修改抢购瓶数为1 具体修改为:在jd_spider_requests.py文件中搜索self.seckill_num = 2,将2改为1

4.运行main.py

根据提示选择相应功能即可。如果出现请扫码登录的提示可查看项目目录下是否存在qr_code.png文件,若存在打开图片,并使用京东手机APP扫码登录即可。

  • Linux下命令行方式显示二维码(以Ubuntu为例)
$ sudo apt-get install qrencode zbar-tools # 安装二维码解析和生成的工具,用于读取二维码并在命令行输出。
$ zbarimg qr_code.png > qrcode.txt && qrencode -r qrcode.txt -o - -t UTF8 # 解析二维码输出到命令行窗口。

5.抢购结果确认

抢购是否成功通常在程序开始的一分钟内可见分晓!
搜索日志,出现“抢购成功,订单号xxxxx",代表成功抢到了,务必半小时内支付订单!程序暂时不支持自动停止,需要手动STOP!
若两分钟还未抢购成功,基本上就是没抢到!程序暂时不支持自动停止,需要手动STOP!

打赏

不用再打赏了,抢到茅台的同学请保持这份喜悦,没抢到的继续加油 :)

感谢

非常感谢原作者 https://github.com/zhou-xiaojun/jd_mask 提供的代码
也非常感谢 https://github.com/wlwwu/jd_maotai 进行的优化
You might also like...
A maintained fork of Danny's discord.py

Nextcord A modern, easy-to-use, feature-rich, and async-ready API wrapper for Discord written in Python. Fork notice This is a fork of discord.py, whi

A Fork of Gitlab's Permifrost tool for managing Snowflake Permissions

permifrost-fork This is a fork of the GitLab permifrost project. As the GitLab team is not currently maintaining the project, we've taken on maintenac

The friendly PIL fork (Python Imaging Library)
The friendly PIL fork (Python Imaging Library)

Pillow Python Imaging Library (Fork) Pillow is the friendly PIL fork by Alex Clark and Contributors. PIL is the Python Imaging Library by Fredrik Lund

A youtube-dl fork with additional features and fixes

yt-dlp is a youtube-dl fork based on the now inactive youtube-dlc. The main focus of this project is adding new features and patches while also keepin

Utility tools for the
Utility tools for the "Divide and Remaster" dataset, introduced as part of the Cocktail Fork problem paper

Divide and Remaster Utility Tools Utility tools for the "Divide and Remaster" dataset, introduced as part of the Cocktail Fork problem paper The DnR d

A toolkit for geo ML data processing and model evaluation (fork of solaris)
A toolkit for geo ML data processing and model evaluation (fork of solaris)

An open source ML toolkit for overhead imagery. This is a beta version of lunular which may continue to develop. Please report any bugs through issues

Maintained wavelink fork for pycord

Pycord.Wavelink Wavelink is robust and powerful Lavalink wrapper for Pycord! Wavelink features a fully asynchronous API that's intuitive and easy to u

A fork of lavalink.py built for nextcord

nextcord-ext-lava is a wrapper for Lavalink which abstracts away most of the code necessary to use Lavalink, allowing for easier integration into your projects, while still promising full API coverage and powerful tools to get the most out of it.

A fork of discord.py for anime enjoyers
A fork of discord.py for anime enjoyers

A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. Key Features Modern Pythonic API using async and await

ETHGreen blockchain is a fork from STAI and Chia blockchain including features implemented by Covid blockchain.

Welcome to ETHGreen Blockchain ETHGreen blockchain is a fork from STAI and Chia blockchain including features implemented by Covid blockchain. About t

A fork of discord.py meant to replace it

Texus A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. Key Features Modern Pythonic API using async and

Who are we? We are the Hunters of all Torrent in this world.🗡️.Fork from SlamDevs

MIRROR HUNTER This Mirror Bot is a multipurpose Telegram Bot writen in Python for mirroring files on the Internet to our beloved Google Drive. Repo la

This is the community maintained fork of ungleich's cdist (after f061fb1).

cdist This is the community maintained fork of ungleich's cdist (after f061fb1). Work is split between three repositories: cdist - implementation of t

Maintained Fork of Jishaku For nextcord

Onami a debugging and utility extension for nextcord bots Read the documentation online. Fork Onami is a actively maintained fork of Jishaku for nextc

A continued fork of Disco
A continued fork of Disco

Orca Orca is an extensive and extendable Python 3.x library for the Discord API. orca boasts the following major features: Expressive, functional inte

Modified fork of Xuebin Qin's U-2-Net Repository. Used for demonstration purposes.

U^2-Net (U square net) Modified version of U2Net used for demonstation purposes. Paper: U^2-Net: Going Deeper with Nested U-Structure for Salient Obje

Insane Weather Bot is here! Give suggestions, fork, and do much more to help us enhance the abilities of Insane Weather Bot.

Insane_Weather_Bot Insane Weather Bot is here! Give suggestions, fork, and do much more to help us enhance the abilities of Insane Weather Bot. Weathe

This is a fork of the BakeTool with some improvements that I did to have better workflow.

blender-bake-tool This is a fork of the BakeTool with some improvements that I did to have better workflow. 99.99% of work was done by BakeTool team.

A fork of discord.py
A fork of discord.py

discord.py A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. The Future of discord.py Please read the gi

Owner
null
Exposè for i3 WM. Fork of https://gitlab.com/d.reis/i3expo to fix crashes and improve features/usability

Overwiew Expo is an simple and straightforward way to get a visual impression of all your current virtual desktops that many compositing window manage

null 137 Nov 3, 2022
Whoosh indexing capabilities for Flask-SQLAlchemy, Python 3 compatibility fork.

Flask-WhooshAlchemy3 Whoosh indexing capabilities for Flask-SQLAlchemy, Python 3 compatibility fork. Performance improvements and suggestions are read

Blake VandeMerwe 27 Mar 10, 2022
Frets on Fire X: a fork of Frets on Fire with many added features and capabilities

Frets on Fire X - FoFiX This is Frets on Fire X, a highly customizable rhythm game supporting many modes of guitar, bass, drum, and vocal gameplay for

FoFiX 377 Jan 2, 2023
A fork of OpenAI Baselines, implementations of reinforcement learning algorithms

Stable Baselines Stable Baselines is a set of improved implementations of reinforcement learning algorithms based on OpenAI Baselines. You can read a

Ashley Hill 3.7k Jan 1, 2023
pymobiledevice fork with more recent coding standards and many more features

Description Features Installation Usage Sending your own messages Lockdown messages Instruments messages Example Lockdown services com.apple.instrumen

null 255 Dec 28, 2022
chiarose(XCR) based on chia(XCH) source code fork, open source public chain

chia-rosechain 一个无耻的小活动 | A shameless little event 如果您喜欢这个项目,请点击star 将赠送您520朵玫瑰,可以去 facebook 留下您的(xcr)地址,和github用户名。 If you like this project, please

ddou123 376 Dec 14, 2022
seno-blockchain is just a fork of Chia, designed to be efficient, decentralized, and secure

seno-blockchain https://seno.uno Seno is just a fork of Chia, designed to be efficient, decentralized, and secure. Here are some of the features and b

Denis Erygin 27 Jul 2, 2022
a fork of the OnionShare software better optimized for lower spec lightweight machines and ARM processors

OnionShare-Optimized A fork of the OnionShare software better optimized for lower spec lightweight machines and ARM processors such as Raspberry Pi or

ALTPORT 4 Aug 5, 2021
An Inline Telegram YouTube Downloader bot with custom, permanent thumbnail support and cancel upload facility. Make your fork now.

Inline-Tube-Mate (YouTube Downloader) An Inline Telegram bot that can download YouTube videos with permanent thumbnail support Bot need to be in Inlin

Renjith Mangal 41 Dec 14, 2022
Pycord, a maintained fork of discord.py, is a python wrapper for the Discord API

pycord A fork of discord.py. PyCord is a modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. Key Features Mo

Pycord Development 2.3k Dec 31, 2022