秀色娱乐论坛

 找回密码
 关闭注册
搜索
热搜: 活动 交友 discuz

社区广播台

查看: 2887|回复: 0
打印 上一主题 下一主题

京东养红包脚本

[复制链接]

416

主题

422

帖子

1756

积分

管理员

Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20

积分
1756
跳转到指定楼层
楼主
发表于 2019-10-23 16:30:12 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
【确认自己已经登录了京东账号,电脑版运行脚本无视页面显示的内容


首次参加,先打开京东APP,首页右侧浮标“疯抢一亿”开启活动



接下来说正文
——————————————————————————————
打开这个活动地址
  1. https://happy.m.jd.com/babelDiy/GZWVJFLMXBQVEBDQZWMY/XJf8bH6oXDWSgS91daDJzXh9bU7/index.html#/index
复制代码

chrome浏览器=>打开活动地址=>F12=>console=>黏贴脚本,回车运行


脚本如下
  1. let productList = [], shopList = [], url = "https://api.m.jd.com/client.action";
  2. function autoPost(id,type){
  3.         fetch(`${url}?timestamp=${new Date().getTime()}`,{method: "POST",mode: "cors",credentials: "include",headers:{"Content-Type": "application/x-www-form-urlencoded"},body:`functionId=raisepacket_collectScore&body={"type":${type},"ext":"${id}","appsign":1,"msgsign":2}&client=wh5`})
  4.                 .then(function(response){return response.json()})
  5.                 .then(function(res){
  6.                         console.log(res.data.biz_msg);
  7.                 });
  8. }

  9. function start(){
  10.         fetch(`${url}?${new Date().getTime()}`,{method: "POST",mode: "cors",credentials: "include",headers:{"Content-Type": "application/x-www-form-urlencoded"},body:'functionId=raisepacket_getShopAndProductList&body=&client=wh5'})
  11.                 .then(function(response){return response.json()})
  12.                 .then(function(res){
  13.                         productList = res.data.result.productList;
  14.                         shopList  = res.data.result.shopList;
  15.                         console.log(`获取到任务,商品:${productList.length} 商品:${shopList.length}`);
  16.                         autoProductTask();
  17.                 });
  18. }
  19. //逛商品
  20. function autoProductTask(){
  21.         for(let i = 0,leng = productList.length;i<leng;i++){
  22.                 (function(index){
  23.                         setTimeout(()=>{
  24.                                 let item = productList[index];
  25.                                 autoPost(item['id'],4);
  26.                                 console.log(`商品总任务数:${leng} 当前任务数:${index + 1}`);
  27.                                 if( leng-1 == index){
  28.                                         autoShopTask();
  29.                                 }
  30.                         },index*1500)
  31.                 })(i)      
  32.         }
  33. }
  34. //逛店铺
  35. function autoShopTask(){
  36.         for(let i = 0,leng = shopList.length;i<leng;i++){
  37.                 (function(index){
  38.                         setTimeout(()=>{
  39.                                 let item = shopList[index];
  40.                                 autoPost(item['id'],2);
  41.                                 console.log(`商铺总任务数:${leng} 当前任务数:${index + 1}`);
  42.                                 if( leng-1 == index){
  43.                                         autoPlay();
  44.                                 }
  45.                         },index*1500)
  46.                 })(i)      
  47.         }
  48. }
  49. //好玩互动
  50. function autoPlay(){
  51.         for(let i = 0,leng = 4;i<leng;i++){
  52.                 (function(index){
  53.                         setTimeout(()=>{
  54.                                 autoPost(0,5);
  55.                                 console.log(`好玩互动:${leng} 当前任务数:${index + 1}`);
  56.                                 if( leng-1 == index){
  57.                                         autoInteract();
  58.                                 }
  59.                         },index*1000)
  60.                 })(i)      
  61.         }
  62. }
  63. //视频直播
  64. function autoInteract(){
  65.         for(let i = 0,leng = 4;i<leng;i++){
  66.                 (function(index){
  67.                         setTimeout(()=>{
  68.                                 autoPost(0,10);
  69.                                 console.log(`视频直播:${leng} 当前任务数:${index + 1}`);
  70.                                 if( leng-1 == index){
  71.                                         autoShopping();
  72.                                 }
  73.                         },index*1000)
  74.                 })(i)      
  75.         }
  76. }
  77. //精彩会场
  78. function autoShopping(){
  79.         for(let i = 0,leng = 3;i<leng;i++){
  80.                 (function(index){
  81.                         setTimeout(()=>{
  82.                                 autoPost(0,3);
  83.                                 console.log(`精彩会场:${leng} 当前任务数:${index + 1}`);
  84.                                 },
  85.                         index*1000)
  86.                 })(i)      
  87.         }
  88. }
  89. start();
复制代码

您需要登录后才可以回帖 登录 | 关闭注册

本版积分规则

快速回复 返回顶部 返回列表