Collected 4k+ stars in two days, and grabbed the Moutai script to dominate GitHub

Some East grabs Moutai script

In January, when Fubaojun was browsing GItHub, he saw a project on the hot listjd_seckill, which was a Python script to compete for Moutai in a certain company.

The main function of this script is: "Automatically log in to the e-commerce platform -> Automatically reserve Moutai at a scheduled time -> Start automatic snap-up at a scheduled time. Currently, it only supports the snap-up of Feitian Moutai on a certain e-commerce platform, and other functions are not supported for the time being."

Qianshaojun heard from a friend that you can make thousands of profits by pouring one hand of Moutai Feitian Liquor. It has to be said that with the popularity of Moutai, the number of stars of this snap-up script software has also skyrocketed.

In February, this project soared to the top of the list, garnering more than 2,000 stars in one day.
Insert image description here

A certain cat grabs Moutai script

Althoughjd_seckill has been cleared, there is another Moutai person on the GitHub hot list today.
img
It is estimated that this project may move forward again.

//定时器
var timer = null;

//检测状态
function checkElementState(path,callback){
 var ele = document.querySelector(path);
 if(ele){
  callback && callback();
 }else{
  console.log('异步加载元素中....' + path );
  setTimeout( function(){checkElementState(path,callback);},200);
 }
}



//点击购买按钮
function clickBuy(){
 
 console.log('买!');
 
 //票的数量  如果还不可以购买,这个地方获取会失败 
 var amount = document.getElementsByClassName('mui-amount-increase')[0];
 amount && amount.click();  //+1
 
 var btnBuy = document.querySelector('');
 
}


//结算
function checkOut(){
 
 
 console.log('结算开始....');
 var btn = document.getElementById('J_Go');
 
 if(btn){
  btn.click();
 }else{
  console.log('结算按钮没找到');
 }
 
}

function checkOutAsync(){
 checkElementState('#J_Go',checkOut);
}

//提交订单
function submitOrder(){
 
 console.log('提交订单开始....');
 
 
 
 checkElementState('.go-btn',function(){
  var btn = document.querySelector(".go-btn");
 
  if(btn){
   btn.click();
  }else{
   console.log('提交订单按钮没找到');
  }
   
 });
}



//目标时间
 var dDate = new Date();  //10点和20点开抢
 if( dDate.getHours() < 10 ){
  dDate.setHours(9,59,59.2);
 }else{
  dDate.setHours(19,59,59.2);
 }
 
 //dDate.setSeconds( dDate.getSeconds() + 10 );
 
//进入时间判断循环
function enterTimeCheckLoop(callback){
 var date = new Date();
 
 
 
 
 var diff = Date.parse(dDate) - Date.parse(date) ;
 
 console.log(diff);
 
 if(diff < - 900 ){
  
  console.log('时间过了!');
  
 }else if(diff < 500 ) {

  callback && callback();
  
  console.log('时间到了!!!');
  
 }else{
  setTimeout(function(){ enterTimeCheckLoop(callback);},400);
  
  //console.log('--');
 }
 
 
 
}


//主要函数
function main(){
 console.log('############################开始抢购茅台############################');
 
 //debugger;
 
 var href = window.location.href;
 if(href.indexOf('cart.tmall.com') > -1 ){
  //结算页面
  
  //进入时间判断
  enterTimeCheckLoop( checkOutAsync );
 
 
 }else if(href.indexOf('buy.tmall.com') > -1 ){
  //提交订单页面
  
  submitOrder();
 }
 
}


main();

In addition, I am afraid that you will not be able to use it, so I have prepared it directly for you. You can download it and open it directly for use!
The source code is on Baidu cloud disk. If you need to scan the CSDN official certification QR code below on WeChat, you can get it for free

Guess you like

Origin blog.csdn.net/WANGJUNAIJIAO/article/details/129006364#comments_25806936