The latest version [Jingdong Feitian Maotai 1499 snapped up] Python script complete installation, tutorial and solutions

The source code download is shared at the end of the article (including the decompression password)

This column and article contain the following content (purchase the column can view all the articles in this column, including subsequent updates)
1. Permanently provide source code and script optimized updates
2. Source code configuration tutorial (with Xiaobai Tutorial
3. How to install python3
4. How to obtain eid and fp
5. Explain some problems encountered in the configuration
6. Explain the problems encountered in the process of running the code
7. After configuring and running, how to use the interface
8. Individually explain the problems encountered by each person
9. Matters needing attention
Affirm:
1. The tutorial and source code are for learning only, and should not be used for other purposes
2. I am not responsible for anything that learners do with the program
3. If you subscribe to this article, I do not guarantee that you can grab the Moutai you need

Two days ago, I saw a big guy open sourced a script for grabbing Moutai on Github (https://github.com/huanghyw/jd_seckill). Now it has reached 8.9kstar, but I don’t know why it has been deleted by the author. Fortunately, I instantly saved it to my computer. Hahaha...It's really a little clever ghost.
Insert picture description here
The author is really amazing and worth learning. This script is written in Python, and it's easy to set up the environment. Here's how to set up the running environment.

1. Environment Setup

Step 1: Download the project code to the local and decompress it. (The source code download is at the end of the article)

Step 2: Enter the decompressed directory and use venv to create a virtual environment. Note that Python 3 must be used. After creation, enter the virtual environment

# 创建虚拟环境
$ python3 -m venv .

# 进入虚拟环境
$ source bin/activate

Step 3: Install the dependency package in the virtual environment

If it is mac or linux, just execute this command

$ python -m pip install -r requirements.txt

And if you use windows, there is one dependent on the lxmllibrary, which in the windows you use pip is not installed, you have to download the wheel files from the Internet to install it manually, and then execute the command above, the download link below, remember to select the corresponding version of Python, because the pages of this lxml version 4.6.2, so you have to manually change the file requirements.txt lxmlversion.

# lxml 下载地址
https://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml

So your operating environment is set up.

2. Preparation

Before starting to grab, there are some configurations that you need to do manually, mainly these items:

Jingdong's eid and fp

Log in to your JD web version, choose any product to place an order, and then use the browser's F12 to track the _JdTdudfp variable, you can get eid and fp
Insert picture description here

And these two values are written to the project under the root directory of config.inithe file.

In the config.inimiddle there is a very important setting, it is time to buybuy_time
Insert picture description here

Because the code is actually executing a while loop, if the time is up to the set value, it will start to simulate the request and start grabbing

Insert picture description here

3. Start panic buying

After the above configuration is completed, you can start to grab.

The process of looting is divided into two steps:

The first step: open PLUS membership

A certain Dong Zhenhang, this wave of marketing was originally intended to allow me to open a PLIUS membership. I, a person who is reluctant to open NetEase Cloud Music, actually opened a PLUS membership that I can’t even use in order to grab Moutai. This Members can only pay 78 yuan at least quarterly, and I reluctantly opened it as an investment.

Step 2: Make an appointment to buy

Only users can participate in buying an appointment, you can manually search 茅台into an appointment, you can also use this script to help you make an appointment.

Execution py main.pythen enter 1, will pop up a two-dimensional code, open the app Jingdong authorized landing on your phone, then the script will go and you make an appointment.
Insert picture description here

Step 2: Start buying

Everything is ready, you just have to execute it when it's almost 10 in the morning py main.py, and then enter 2it. The next step depends on your luck.
Insert picture description here

The above is the complete process of using jd_seckill to grab Moutai. I wrote it very clearly, even clearer than the official document on github. . I really broke my heart for the welfare of the readers.

If you get it, you can choose to resell it and make a net profit. Of course, you can also collect it yourself and wait for the appreciation. If the local tyrant wants to drink it, please feel free to drink it.

Get the source code

Baidu cloud link: https://pan.baidu.com/s/1qRa7UZYlBnldsJpHmumGlw
Extraction code: 5u13

Guess you like

Origin blog.csdn.net/weixin_48062319/article/details/115209160