京东618热爱狂欢趴 一键完成任务脚本来袭(更新)
2021-06-15更新:
1、修复火爆
闪退的需要安装下crypto-js (在放下载的软件的文件夹里打开cmd,比如你软件放在D:\jd文件夹下,就cmd到这个文件夹下安装 )
直接输入:
npm install crypto-js
脚本会迟到,但不会缺席~ hhh
京东618热爱狂欢趴一键做任务,让大家不用每日进行重复且浪费时间的操作.
活动地址:https://wbbny.m.jd.com/babelDiy/Zeus/2s7hhSTbhMgxpGoa9JDnbDzJTaBB/index.html#/home
活动好几天了,忙着一直没去整,也看到了很多网上已经做好的软件,不少网友反馈怕偷cookie,不过确实,防人之心不可无
话不多少直接奔重点吧,跟以前一样python脚本,同时也会生成一个exe供不会python的人用
2021-06-15更新:
1、修复火爆
2021-06-12通知:
闪退的需要安装下crypto-js (在放下载的软件的文件夹里打开cmd,比如你软件放在D:\jd文件夹下,就cmd到这个文件夹下安装 )
直接输入:
npm install crypto-js
2021-06-10通知:
估计这个js每天都要更新了,多关注云盘或者git,更新了会直接上传不在这通知了
2021-06-08更新:
1、更新加密js,修复火爆,下载最新js替换06-06的js即可
2021-06-06更新:
1、增加图鉴任务和抽奖
2、增加微信小程序任务
3、修复了一些bug
2021-06-03更新:
1、修复大部分火爆,增加加密js代码调用,务必下载jiami.js与py文件放一起,exe的话也需要
2、python的话安装PyExecJS库
3、打包exe
4、***************需要安装node.js**************** 官网:https://nodejs.org/en/
win7安装不了,下载低版本:https://nodejs.org/dist/latest-v13.x/
安装时选下添加环境变量
2021-06-02更新:
1、修复火爆问题,应该大部分号不火爆了
2、删除星推官活动
3、打包生成cookie exe软件
2021-05-31更新
新增:
1、添加扫码获取Cookie脚本,打开后使用京东app扫二维码,会生成对应的ck.txt文件
2、新增京东星推官活动
GitHub开源地址:https://github.com/xoyi/jd_wbbny
https://meituan.lanzoui.com/b0f8iaueb 密码: ct2k
脚本使用方法:
1、python脚本,依赖requests库,需要自己抓取cookie,保存在ck.txt文件中
2、参数设置
task_times #循环任务次数,可以多跑几次没事
sleep_times #间隔时间,默认在任务所需的基础上加,一般设置2s左右就成,看自己
3、脚本可以完成签到,逛店,加购等任务
4、将py文件或者exe文件跟ck.txt放一起运行,没ck.txt的自己创建个,多账号的话换行放cookie即可
5、python打包出的exe都比较大,介意的直接用文件或者看源码
截图:
试了几个号暂时看着没啥问题,运行截图
源码:
import urllib import requests import time import json import random import re import sys from urllib import parse import urllib3 urllib3.disable_warnings() #活动地址 #https://wbbny.m.jd.com/babelDiy/Zeus/2s7hhSTbhMgxpGoa9JDnbDzJTaBB/index.html#/home #欢迎使用jd脚本,有问题可以咨询作者QQ:1811881314 #循环任务次数,可以多跑几次没事 task_times = 3 #间隔时间,默认在任务所需的基础上加,一般设置2s左右就成,看自己 sleep_times = 2 Cookies = [] try: with open('ck.txt','r', encoding='utf-8') as ef: for i in ef: i = i.strip('\r\n') Cookies.append(i) except: print('看看有ck.txt文件没,看看放cookie没') input('按任意键退出') sys.exit() #初始化 def get_secretp(headers): url = 'https://api.m.jd.com/client.action?functionId=zoo_getHomeData' data = 'functionId=zoo_getHomeData&body={}&client=wh5&clientVersion=1.0.0' res = requests.post(url,data=data,headers=headers,verify=False,timeout=5).json() if res.get('data').get('bizCode') == 0: return res.get('data').get('result').get('homeMainInfo').get('secretp') else: print('初始化失败') return None #获取任务列表 def task_list(headers): url = "https://api.m.jd.com/client.action?functionId=zoo_getTaskDetail" data = 'functionId=zoo_getTaskDetail&body={}&client=wh5&clientVersion=1.0.0' try: res = requests.post(url,headers=headers,data=data,verify=False).json() if res.get('code') == 0: datas = res.get('data').get('result').get('taskVos') lists = [] for i in datas: taskId = i.get('taskId') status = i.get('status') taskTitle = i.get('taskName') if status == 1 and taskId != 2 and taskId != 14 and taskId != 16 and taskId != 17: s = (taskId,taskTitle) lists.append(s) if status == 3: print(taskTitle + '任务已完成') return lists else: print(res.get('msg')) except: print('其他') def get_taskVos(taskId,headers): url = 'https://api.m.jd.com/client.action?functionId=zoo_getTaskDetail' data = 'functionId=zoo_getTaskDetail&body={"taskId":%s}&client=wh5&clientVersion=1.0.0' % taskId try: res = requests.post(url,headers=headers,data=data,verify=False).json() if res.get('code') == 0: taskVos = res.get('data').get('result').get('taskVos')[0] return taskVos else: print(res.get('msg')) except: print('其他') #签到 def sign(headers): url = 'https://api.m.jd.com/client.action?functionId=zoo_sign' data = 'functionId=zoo_sign&body={}&client=wh5&clientVersion=1.0.0' try: res = requests.post(url,headers=headers,data=data,verify=False).json() if res.get('code') == 0: if res.get('data').get('bizCode') == 0: redPacketValue = res.get('data').get('result').get('redPacketValue') print('签到成功,获得%s元红包' % redPacketValue) else: print(res.get('data').get('bizMsg')) else: print(res.get('msg')) except: print('其他') #逛店 def guangdian(taskId,taskToken,itemId,buttonid,headers): randomnum = random.randint(1000000,9999999) secretp = get_secretp(headers) url = 'https://api.m.jd.com/client.action?functionId=zoo_collectScore' body = { "taskId":taskId, "actionType":1, "taskToken":taskToken, "ss":"{\"extraData\":{\"log\":\"-1\",\"sceneid\":\"QD216hPageh5\"},\"secretp\":\"%s\",\"random\":\"%s\"}" % (secretp,randomnum), } bodys = json.dumps(body) data = 'functionId=zoo_collectScore&body=%s&client=wh5&clientVersion=1.0.0' % bodys try: res = requests.post(url,headers=headers,data=data,verify=False,timeout=5).json() if res.get('data').get('bizCode') == 0: print('进店成功') return res else: print(res.get('data').get('bizMsg')) except: print('其他') #领取 def lingqu(taskToken,headers): url = 'https://api.m.jd.com/client.action?client=wh5&clientVersion=1.0.0&functionId=qryViewkitCallbackResult&body=' body = { 'dataSource': "newshortAward", 'method': "getTaskAward", 'reqParams': "{\"taskToken\":\"%s\"}" % taskToken, 'sdkVersion': "1.0.0", 'clientLanguage': "zh" } bodys = json.dumps(body) uri = url + bodys try: response = requests.get(uri,headers=headers,verify=False,timeout=5).json() if response.get('code') == '0': print(response.get('toast').get('subTitle')) else: print('其他') except: print('其他') def getFeedDetail(taskId,headers): url = 'https://api.m.jd.com/client.action?functionId=zoo_getFeedDetail' data = 'functionId=zoo_getFeedDetail&body={"taskId":"%s"}&client=wh5&clientVersion=1.0.0' % taskId try: res = requests.post(url,headers=headers,data=data,verify=False,timeout=5).json() productInfoVos = res.get('data').get('result').get('addProductVos')[0].get('productInfoVos') # print(productInfoVos) return productInfoVos except: print('其他') # getFeedDetail() #任务列表内容 def renwu(headers): lists = task_list(headers) for list1 in lists: taskId,taskTitle = list1 print(taskId,taskTitle) taskVos = get_taskVos(taskId,headers) if taskId == 1 or taskId ==4 or taskId == 5 or taskId == 6 or taskId == 8 or taskId == 3: print('>>>>>开始进行%s任务' % taskTitle) buttonid = 'jmdd-react-smash_73' waitDuration=taskVos.get('waitDuration') shoppingActivityVos = taskVos.get('shoppingActivityVos') for shop in shoppingActivityVos: shopstatus = shop.get('status') taskToken = shop.get('taskToken') shoptitle = shop.get('title') itemId = shop.get('itemId') if shopstatus == 1: print('任务“%s”' % shoptitle) guangdian(taskId,taskToken,itemId,buttonid,headers) print('等待%s秒' % (waitDuration + sleep_times)) time.sleep(int(waitDuration + sleep_times)) lingqu(taskToken,headers) if taskId == 9: print('>>>>>开始进行%s任务' % taskTitle) waitDuration=taskVos.get('waitDuration') buttonid = 'jmdd-react-smash_73' browseShopVos = taskVos.get('browseShopVo') for browseShop in browseShopVos: browsestatus = browseShop.get('status') browsetaskToken = browseShop.get('taskToken') shopName = browseShop.get('shopName') shopId = browseShop.get('shopId') if browsestatus == 1: print('任务“%s”' % shopName) guangdian(taskId,browsetaskToken,shopId,buttonid,headers) print('等待%s秒' % (waitDuration + sleep_times)) time.sleep(int(waitDuration + sleep_times)) lingqu(browsetaskToken,headers) if taskId == 22: print('>>>>>开始进行%s任务' % taskTitle) buttonid = 'jmdd-react-smash_73' browseShopVos = taskVos.get('browseShopVo') for browseShop in browseShopVos: browsestatus = browseShop.get('status') browsetaskToken = browseShop.get('taskToken') shopName = browseShop.get('shopName') shopId = browseShop.get('shopId') if browsestatus == 1: print('任务“%s”' % shopName) guangdian(taskId,browsetaskToken,shopId,buttonid,headers) print('等待%s秒' % sleep_times) time.sleep(sleep_times) if taskId == 15 or taskId == 7: print('>>>>>开始进行%s任务' % taskTitle) buttonid = 'jmdd-react-smash_73' shoppingActivityVos = taskVos.get('shoppingActivityVos') for shop in shoppingActivityVos: shopstatus = shop.get('status') taskToken = shop.get('taskToken') shoptitle = shop.get('title') itemId = shop.get('itemId') if shopstatus == 1: print('任务“%s”' % shoptitle) guangdian(taskId,taskToken,itemId,buttonid,headers) print('等待%s秒' % sleep_times) time.sleep(sleep_times) if taskId == 10 or taskId == 13 or taskId == 11 or taskId == 12: print('>>>>>开始进行%s任务' % taskTitle) buttonid = 'jmdd-react-smash_73' productInfoVos = getFeedDetail(taskId,headers) for productInfoVo in productInfoVos: itemId = productInfoVo.get('itemId') taskToken = productInfoVo.get('taskToken') skuName = productInfoVo.get('skuName') status = productInfoVo.get('status') if status == 1: print('开始加购“%s”' % skuName) ress = guangdian(taskId,taskToken,itemId,buttonid,headers) times = ress.get('data').get('result').get('times') if times == 5: break print('等待%s秒' % sleep_times) time.sleep(sleep_times) else: pass print('任务已跑完,如发现还有任务未完成,可以修改times设置多次轮询跑') for Cookie in Cookies: headers = { 'Connection': 'keep-alive', 'Pragma': 'no-cache', 'Cache-Control': 'no-cache', 'User-Agent': 'jdapp;Mozilla/5.0 (iPhone; CPU iPhone OS 14_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', 'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*', 'Origin': 'https://wbbny.m.jd.com', 'Sec-Fetch-Site': 'same-site', 'Sec-Fetch-Mode': 'cors', 'Sec-Fetch-Dest': 'empty', 'Referer': 'https://wbbny.m.jd.com/', 'Accept-Language': 'zh-CN,zh;q=0.9', 'Cookie':Cookie } sign(headers) i = 1 while i < task_times: renwu(headers) print('等待5s后重新获取任务') time.sleep(5) i+=1 print(time.strftime("%Y-%m-%d %H:%M:%S",time.localtime(int(time.time()))))
Cookie抓取:
一、直接使用cookie软件抓取
二、不会python且不妨exe的用下边方法
1.推荐使用chrome浏览器,打开浏览器,按F12选择手机模式
2.浏览器的 User-Agent 必须包含 jdapp,设置含有jdapp的user-agent,设置完成save后记得选择对应的user-agent
exp:
jdapp;iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3
3.访问 https://wbbny.m.jd.com/babelDiy/Zeus/2s7hhSTbhMgxpGoa9JDnbDzJTaBB/index.html#/home,登录京东账号。
4.登录后,点击network,然后活动中的任务列表,在network中找到那个请求的接口,把Headers 中的Cookie复制出来,直接document出来的貌似失败