京东准点秒杀脚本【2020】
生活随笔
收集整理的這篇文章主要介紹了
京东准点秒杀脚本【2020】
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
直接上菜
1.瀏覽器打開?https://www.jd.com/,登錄京東
2.選擇要搶購的商品
3.按鍵盤F12,打開開發者模式,選擇Console選項卡
4.把以下代碼粘貼在Console里面,修改代碼里開始搶購時間(有二處時間)
var nIntervId; var count = 1; var goDate; function go() {console.log("正在幫你搶購 * 刷新" + count + "次");//console.log("host:" + window.location.hostname);count++; if (Date.now() >= new Date("2020-12-11 23:59:59")) {console.log("開始搶購" + Date.now());// 搶購if ($(parent.frames[0].document).find("#choose-btn-ko").length == 1) {console.log("++++++++++++搶購");var sku = window.location.pathname.replace(/[^0-9]/ig, "");var ref = "//cart.jd.com/gate.action?pid=" + sku + "&pcount=1&ptype=1";console.log("https:" + ref);//5089237$(parent.frames[0].document).find("#choose-btn-ko").attr("href", ref);// parent.frames[0].document.getElementById("choose-btn-ko").click();return;}//預約搶購if ($(parent.frames[0].document).find("#btn-reservation").length == 1) {console.log("++++++++++++正在預約搶購");parent.frames[0].document.getElementById("btn-reservation").click();return;}//加入購物車 if ($(parent.frames[0].document).find("#InitCartUrl").length == 1) {console.log("++++++++++++加入購物車");parent.frames[0].document.getElementById("InitCartUrl").click();return;}//去購物車結算if ($(parent.frames[0].document).find("#GotoShoppingCart").length == 1) {console.log("++++++++++++正在去購物車結算");parent.frames[0].document.getElementById("GotoShoppingCart").click();}//去結算 if ($(parent.frames[0].document).find(".common-submit-btn").length == 1) {console.log("++++++++++++正在去結算");//只提交我搶購的商品//var sku = window.location.pathname.replace(/[^0-9]/ig, ""); //$("#toggle-checkboxes_up").trigger("click");//全不選擇//parent.frames[0].document.getElementById("toggle-checkboxes_up").click();//$(parent.frames[0].document).find('input:checkbox').attr("checked",false);//$(parent.frames[0].document).find("input:checkbox[value^='"+sku+"']").trigger("click");//$(parent.frames[0].document).find("input:checkbox[value^='"+sku+"']").attr("checked",true);parent.frames[0].document.getElementsByClassName("common-submit-btn")[0].click();}//提交訂單order-submitif ($(parent.frames[0].document).find("#order-submit").length == 1) {console.log("(++++++++++++正在提交訂單");//$(parent.frames[0].document).find(".payment-item item-selected online-payment")//在線支付parent.frames[0].document.getElementById("order-submit").click();}} } function rewrite(current) {fr4me = '<frameset cols=\'*\'>\n<frame src=\'' + current + '\'/>';fr4me += '</frameset>';with (document) { write(fr4me); void (close()) }; }//注入sql rewrite(window.location.href);//這里需要注意的是,prompt有兩個參數,前面是提示的話,后面是當對話框出來后,在對話框里的默認值 var d = prompt("請輸入搶購開始時間", "2020-12-11 23:59:59"); //如果返回的有內容 if (d) {try {goDate = new Date(d);console.log("設定時間成功:" + goDate);alert("監控期間,請保持標簽頁在最前面");//go(); 0.25秒執行一次nIntervId = setInterval("go()", 250);}catch (e) {alert("時間格式不正確,請使用yyyy-MM-dd hh:mm:ss格式,精確到秒, 請重試");} } else {alert("請搶購時間, 請重重試");}/*clearInterval(nIntervId);//停止監控*/部分人,添加進購物車會空
你們可以看看這塊代碼,
//去購物車結算 if ($(parent.frames[0].document).find("#GotoShoppingCart").length == 1) {console.log("(++++++++++++正在去購物車結算");parent.frames[0].document.getElementById("GotoShoppingCart").click(); }我試了下,沒找到好的解決方案,有大佬解決的,歡迎評論區留言,單獨運行?document.getElementById("GotoShoppingCart").click();? 【去購物車結算】跳轉過去是有商品的
5.鍵盤按回車鍵,確認時間,執行搶購
、
6.代碼執行搶購
7.搶購完成,付款
?騰訊云
1核2G云服務器首年88元
阿里云618
1核2G|1M|40G盤 ?79元/年(可續費)?
2核2G|5M|40G盤 ?99元/年(可續費)?
2核4G|10M|100G盤 263元/年
活動地址:?開發者邀請得好禮
總結
以上是生活随笔為你收集整理的京东准点秒杀脚本【2020】的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: jQuery 瀑布流插件
- 下一篇: 更改ubuntu引导界面_UBuntu修