IMCAFS

Home

script of seizing treasure island in jingdong

Posted by tzul at 2020-02-26
all

The treasure island of Jingdong is the auction platform of "defective products" of Jingdong. I tried to shoot an item and found that the competition was still fierce. A few seconds before the end of the auction, a large number of buyers are competing for bids. It's not easy to get their own items at the price of Xinyi.

A simple analysis of the treasure island page, I feel that it is not difficult to achieve a snapshot script. I did not find any ready-made plug-ins, so I did it myself.

In order to realize the function of snapshot, the general idea is to make a browser plug-in. It's good to be a browser plug-in, but it's a little troublesome to write. A simpler way is to use browser favorites to execute scripts on the current page. Add javascript: void (alert ('execute current script ') to the browser's favorites, and when you click the entry, JS script will be executed on the current page.

javascript:void(alert('执行当前脚本'))

Using this feature of browser, I wrote the following script. Modify the highest bid and user nickname in the script, combine the script into one line, and add it to the browser's favorites. Enter the page that needs to be snapped, click, and then it will automatically bid for you.

One

Two

Three

Four

Five

Six

Seven

Eight

Nine

Ten

Eleven

Twelve

Thirteen

Fourteen

Fifteen

Sixteen

Seventeen

Eighteen

Nineteen

javascript:void(

  t=setInterval(function(){

Max = 450; / / your highest bid. If you exceed this price, you won't be robbed

Uid ='vicalloy '; / / your nickname in Jingdong (you can't rob with yourself)

Did = $('. List info > Li. Fore1'). Text(). Replace ('treasure number: ',');

    url="http://auction.360buy.com/json/paimai/bid_records?pageNo=1&pageSize=1&dealId="+did;

    ct=$('.over-time>strong').text();

If (parseInt (CT) > 10) return; / / start the robbery in the last 10 seconds

    $.getJSON(url, function(d){

      p = parseInt(d.datas[0].price)+1;

      cuid = d.datas[0].userNickName;

      if (p>max) {

        clearInterval(t);

        return;

      }

      if (uid==cuid) return;

      $.get("http://auction.360buy.com/json/paimai/bid?dealId="+did+"&price="+p);

};

}, 1000)) / / refresh the price once a second. If you want to improve the success rate of the bid, you can reduce the interval.