京东秒杀抢购的小脚本和CHORME的一个开发者插件

助手阿喜 使用手册评论71字数 2978阅读9分55秒阅读模式

CHORME开发者插件
下载源码包:https://github.com/gongjunhao/seckill/archive/master.zip
解压:seckill-master.zip
打开chrome浏览器,设置 --> 更多工具 --> 扩展程序
勾选开发者模式
点击“加载已解压的扩展程序”按钮,选择解压目录下的src目录,点击“确定”,即可完成安装

第二种可行方案——脚本编辑
使用方式:文章源自助手阿喜-https://zsaxi.com/4209

​ 1:打开要抢购商品的详细画面,请注意网络地址一定要是 item.jd.com开头的详细画面,摁F12,打开开发者模式,选择Console选项卡,把以下代码粘贴在Console里面,回车执行;文章源自助手阿喜-https://zsaxi.com/4209

​ 打开开发者模式文章源自助手阿喜-https://zsaxi.com/4209

 文章源自助手阿喜-https://zsaxi.com/4209

 文章源自助手阿喜-https://zsaxi.com/4209

 文章源自助手阿喜-https://zsaxi.com/4209

保证输入代码后,运行在前台文章源自助手阿喜-https://zsaxi.com/4209

 文章源自助手阿喜-https://zsaxi.com/4209

 文章源自助手阿喜-https://zsaxi.com/4209

代码如下:文章源自助手阿喜-https://zsaxi.com/4209

 文章源自助手阿喜-https://zsaxi.com/4209

var nIntervId;
var count = 1;
var goDate;
function go() {
console.log("臭小米手环抢不到********************* 刷新" + count + "次");
//console.log("host:" + window.location.hostname);
count++;
// 小米手环4 go set time
if (Date.now() >= new Date("2017-11-03 15:59:59")) {
console.log("开始抢购小米手环4" + Date.now());文章源自助手阿喜-https://zsaxi.com/4209

// 小米手环4 抢购
if ($(parent.frames[0].document).find("#choose-btn-ko").length == 1) {
console.log("(++++++++++++小米手环4 抢购");
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;
}文章源自助手阿喜-https://zsaxi.com/4209

//预约抢购
if ($(parent.frames[0].document).find("#btn-reservation").length == 1) {
console.log("(++++++++++++正在预约抢购");文章源自助手阿喜-https://zsaxi.com/4209

parent.frames[0].document.getElementById("btn-reservation").click();
return;
}文章源自助手阿喜-https://zsaxi.com/4209

//秒杀
if ($(parent.frames[0].document).find("#InitCartUrl").length == 1) {
console.log("(++++++++++++正在秒杀");
parent.frames[0].document.getElementById("InitCartUrl").click();
return;
}文章源自助手阿喜-https://zsaxi.com/4209

//去购物车结算
if ($(parent.frames[0].document).find("#GotoShoppingCart").length == 1) {
console.log("(++++++++++++正在去购物车结算");
parent.frames[0].document.getElementById("GotoShoppingCart").click();
}文章源自助手阿喜-https://zsaxi.com/4209

//去结算
if ($(parent.frames[0].document).find(".submit-btn").length == 1) {
console.log("(++++++++++++正在去结算");文章源自助手阿喜-https://zsaxi.com/4209

//只提交我抢购的商品
//var sku = window.location.pathname.replace(/[^0-9]/ig, "");文章源自助手阿喜-https://zsaxi.com/4209

//$("#toggle-checkboxes_up").trigger("click");
//全不选择
//parent.frames[0].document.getElementById("toggle-checkboxes_up").click();文章源自助手阿喜-https://zsaxi.com/4209

//$(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("submit-btn")[0].click();
}
//提交订单order-submit
if ($(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("请输入抢购开始时间", "2019-07-02 09:59:59");
//如果返回的有内容
if (d) {
try {
goDate = new Date(d);
console.log("设定时间成功:" + goDate);

alert("监控期间,请保持标签页在最前面");
//go(); 0.1秒执行一次
nIntervId = setInterval("go()", 100);
}
catch (e) {
alert("时间格式不正确,请使用yyyy-MM-dd hh:mm:ss格式,精确到秒, 请重试");
}
}
else {
alert("请抢购时间, 请重重试");

}

/*
clearInterval(nIntervId);//停止监控
*/

  • 扫码入群
  • 加群获取附件资源,请查看教程说的资源名称查找。
  • weinxin
  • 支持打赏
  • 如果觉得本文对你有帮助,可以打赏任意金额已维持网站运行。
  • weinxin
助手阿喜