mirror of
https://github.com/okyyds/yyds.git
synced 2026-07-14 04:41:17 +08:00
大量更新
This commit is contained in:
File diff suppressed because one or more lines are too long
2311
jd_bean_sign.js
2311
jd_bean_sign.js
File diff suppressed because one or more lines are too long
273
jd_jrmx.py
Normal file
273
jd_jrmx.py
Normal file
@@ -0,0 +1,273 @@
|
|||||||
|
# -*- coding:utf-8 -*-
|
||||||
|
#依赖管理-Python3-添加依赖PyExecJS
|
||||||
|
#依赖安装:进入容器执行:pip3 install PyExecJS
|
||||||
|
#想拿券的cookie环境变量JDJR_COOKIE,格式就是普通的cookie格式(pt_key=xxx;pt_pin=xxx)
|
||||||
|
#活动每天早上10点开始截止到这个月28号,建议corn 5 0 10 * * *
|
||||||
|
|
||||||
|
"""
|
||||||
|
cron: 5 0 10 * * *
|
||||||
|
new Env('京东金融分享助力');
|
||||||
|
"""
|
||||||
|
|
||||||
|
import execjs
|
||||||
|
import requests
|
||||||
|
import json
|
||||||
|
import time
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
import random
|
||||||
|
import string
|
||||||
|
import urllib
|
||||||
|
from urllib.parse import quote
|
||||||
|
|
||||||
|
|
||||||
|
#以下部分参考Curtin的脚本:https://github.com/curtinlv/JD-Script
|
||||||
|
|
||||||
|
|
||||||
|
def randomuserAgent():
|
||||||
|
global uuid,addressid,iosVer,iosV,clientVersion,iPhone,ADID,area,lng,lat
|
||||||
|
|
||||||
|
uuid=''.join(random.sample(['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9','a','b','c','z'], 40))
|
||||||
|
addressid = ''.join(random.sample('1234567898647', 10))
|
||||||
|
iosVer = ''.join(random.sample(["15.1.1","14.5.1", "14.4", "14.3", "14.2", "14.1", "14.0.1"], 1))
|
||||||
|
iosV = iosVer.replace('.', '_')
|
||||||
|
clientVersion=''.join(random.sample(["10.3.0", "10.2.7", "10.2.4"], 1))
|
||||||
|
iPhone = ''.join(random.sample(["8", "9", "10", "11", "12", "13"], 1))
|
||||||
|
ADID = ''.join(random.sample('0987654321ABCDEF', 8)) + '-' + ''.join(random.sample('0987654321ABCDEF', 4)) + '-' + ''.join(random.sample('0987654321ABCDEF', 4)) + '-' + ''.join(random.sample('0987654321ABCDEF', 4)) + '-' + ''.join(random.sample('0987654321ABCDEF', 12))
|
||||||
|
|
||||||
|
|
||||||
|
area=''.join(random.sample('0123456789', 2)) + '_' + ''.join(random.sample('0123456789', 4)) + '_' + ''.join(random.sample('0123456789', 5)) + '_' + ''.join(random.sample('0123456789', 4))
|
||||||
|
lng='119.31991256596'+str(random.randint(100,999))
|
||||||
|
lat='26.1187118976'+str(random.randint(100,999))
|
||||||
|
|
||||||
|
|
||||||
|
UserAgent=''
|
||||||
|
if not UserAgent:
|
||||||
|
return f'jdapp;iPhone;10.0.4;{iosVer};{uuid};network/wifi;ADID/{ADID};model/iPhone{iPhone},1;addressid/{addressid};appBuild/167707;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS {iosV} like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/null;supportJDSHWK/1'
|
||||||
|
else:
|
||||||
|
return UserAgent
|
||||||
|
|
||||||
|
#以上部分参考Curtin的脚本:https://github.com/curtinlv/JD-Script
|
||||||
|
|
||||||
|
|
||||||
|
def printf(text):
|
||||||
|
print(text+'\n')
|
||||||
|
sys.stdout.flush()
|
||||||
|
|
||||||
|
|
||||||
|
def load_send():
|
||||||
|
global send
|
||||||
|
cur_path = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
sys.path.append(cur_path)
|
||||||
|
if os.path.exists(cur_path + "/sendNotify.py"):
|
||||||
|
try:
|
||||||
|
from sendNotify import send
|
||||||
|
except:
|
||||||
|
send=False
|
||||||
|
printf("加载通知服务失败~")
|
||||||
|
else:
|
||||||
|
send=False
|
||||||
|
printf("加载通知服务失败~")
|
||||||
|
load_send()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def get_remarkinfo():
|
||||||
|
url='http://127.0.0.1:5600/api/envs'
|
||||||
|
try:
|
||||||
|
with open('/ql/config/auth.json', 'r') as f:
|
||||||
|
token=json.loads(f.read())['token']
|
||||||
|
headers={
|
||||||
|
'Accept':'application/json',
|
||||||
|
'authorization':'Bearer '+token,
|
||||||
|
}
|
||||||
|
response=requests.get(url=url,headers=headers)
|
||||||
|
|
||||||
|
for i in range(len(json.loads(response.text)['data'])):
|
||||||
|
if json.loads(response.text)['data'][i]['name']=='JD_COOKIE':
|
||||||
|
try:
|
||||||
|
if json.loads(response.text)['data'][i]['remarks'].find('@@')==-1:
|
||||||
|
remarkinfos[json.loads(response.text)['data'][i]['value'].split(';')[1].replace('pt_pin=','')]=json.loads(response.text)['data'][i]['remarks'].replace('remark=','')
|
||||||
|
else:
|
||||||
|
remarkinfos[json.loads(response.text)['data'][i]['value'].split(';')[1].replace('pt_pin=','')]=json.loads(response.text)['data'][i]['remarks'].split("@@")[0].replace('remark=','').replace(';','')
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
except:
|
||||||
|
printf('读取auth.json文件出错,跳过获取备注')
|
||||||
|
|
||||||
|
|
||||||
|
def JDSignValidator(url):
|
||||||
|
with open('JDJRSignValidator.js', 'r', encoding='utf-8') as f:
|
||||||
|
jstext = f.read()
|
||||||
|
ctx = execjs.compile(jstext)
|
||||||
|
result = ctx.call('getBody', url)
|
||||||
|
fp=result['fp']
|
||||||
|
a=result['a']
|
||||||
|
d=result['d']
|
||||||
|
return fp,a,d
|
||||||
|
|
||||||
|
|
||||||
|
def geteid(a,d):
|
||||||
|
url=f'https://gia.jd.com/fcf.html?a={a}'
|
||||||
|
data=f'&d={d}'
|
||||||
|
headers={
|
||||||
|
'Host':'gia.jd.com',
|
||||||
|
'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8',
|
||||||
|
'Origin':'https://jrmkt.jd.com',
|
||||||
|
'Accept-Encoding':'gzip, deflate, br',
|
||||||
|
'Connection':'keep-alive',
|
||||||
|
'Accept':'*/*',
|
||||||
|
'User-Agent':UserAgent,
|
||||||
|
'Referer':'https://jrmkt.jd.com/',
|
||||||
|
'Content-Length':'376',
|
||||||
|
'Accept-Language':'zh-CN,zh-Hans;q=0.9',
|
||||||
|
}
|
||||||
|
response=requests.post(url=url,headers=headers,data=data)
|
||||||
|
return response.text
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def gettoken():
|
||||||
|
url='https://gia.jd.com/m.html'
|
||||||
|
headers={'User-Agent':UserAgent}
|
||||||
|
response=requests.get(url=url,headers=headers)
|
||||||
|
return response.text.split(';')[0].replace('var jd_risk_token_id = \'','').replace('\'','')
|
||||||
|
|
||||||
|
|
||||||
|
def getsharetasklist(ck,eid,fp,token):
|
||||||
|
url='https://ms.jr.jd.com/gw/generic/bt/h5/m/getShareTaskList'
|
||||||
|
data='reqData='+quote('{"extMap":{"eid":"%s","fp":"%s","sdkToken":"","token":"%s","appType":"1","pageUrl":"https://btfront.jd.com/release/shareCouponRedemption/helpList/?channelId=17&channelName=pdy&jrcontainer=h5&jrlogin=true&jrcloseweb=false"},"channelId":"17","bizGroup":18}'%(eid,fp,token))
|
||||||
|
headers={
|
||||||
|
'Host':'ms.jr.jd.com',
|
||||||
|
'Content-Type':'application/x-www-form-urlencoded',
|
||||||
|
'Origin':'https://btfront.jd.com',
|
||||||
|
'Accept-Encoding':'gzip, deflate, br',
|
||||||
|
'Cookie':ck,
|
||||||
|
'Connection':'keep-alive',
|
||||||
|
'Accept':'application/json, text/plain, */*',
|
||||||
|
'User-Agent':UserAgent,
|
||||||
|
'Referer':'https://btfront.jd.com/',
|
||||||
|
'Content-Length':str(len(data)),
|
||||||
|
'Accept-Language':'zh-CN,zh-Hans;q=0.9'
|
||||||
|
}
|
||||||
|
try:
|
||||||
|
response=requests.post(url=url,headers=headers,data=data)
|
||||||
|
for i in range(len(json.loads(response.text)['resultData']['data'])):
|
||||||
|
if json.loads(response.text)['resultData']['data'][i]['couponBigWord']=='12' and json.loads(response.text)['resultData']['data'][i]['couponSmallWord']=='期':
|
||||||
|
printf('12期免息券活动id:'+str(json.loads(response.text)['resultData']['data'][i]['activityId']))
|
||||||
|
return json.loads(response.text)['resultData']['data'][i]['activityId']
|
||||||
|
break
|
||||||
|
except:
|
||||||
|
printf('获取任务信息出错,程序即将退出!')
|
||||||
|
os._exit(0)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def obtainsharetask(ck,eid,fp,token,activityid):
|
||||||
|
url='https://ms.jr.jd.com/gw/generic/bt/h5/m/obtainShareTask'
|
||||||
|
data='reqData='+quote('{"extMap":{"eid":"%s","fp":"%s","sdkToken":"","token":"%s","appType":"1","pageUrl":"https://btfront.jd.com/release/shareCouponRedemption/helpList/?channelId=17&channelName=pdy&jrcontainer=h5&jrlogin=true&jrcloseweb=false"},"activityId":%s}'%(eid,fp,token,activityid))
|
||||||
|
headers={
|
||||||
|
'Host':'ms.jr.jd.com',
|
||||||
|
'Content-Type':'application/x-www-form-urlencoded',
|
||||||
|
'Origin':'https://btfront.jd.com',
|
||||||
|
'Accept-Encoding':'gzip, deflate, br',
|
||||||
|
'Cookie':ck,
|
||||||
|
'Connection':'keep-alive',
|
||||||
|
'Accept':'application/json, text/plain, */*',
|
||||||
|
'User-Agent':UserAgent,
|
||||||
|
'Referer':'https://btfront.jd.com/',
|
||||||
|
'Content-Length':str(len(data)),
|
||||||
|
'Accept-Language':'zh-CN,zh-Hans;q=0.9'
|
||||||
|
}
|
||||||
|
try:
|
||||||
|
response=requests.post(url=url,headers=headers,data=data)
|
||||||
|
printf('obtainActivityId:'+json.loads(response.text)['resultData']['data']['obtainActivityId'])
|
||||||
|
printf('inviteCode:'+json.loads(response.text)['resultData']['data']['inviteCode'])
|
||||||
|
return json.loads(response.text)['resultData']['data']['obtainActivityId']+'@'+json.loads(response.text)['resultData']['data']['inviteCode']
|
||||||
|
except:
|
||||||
|
printf('开启任务出错,程序即将退出!')
|
||||||
|
os._exit(0)
|
||||||
|
|
||||||
|
|
||||||
|
def assist(ck,eid,fp,token,obtainActivityid,invitecode):
|
||||||
|
url='https://ms.jr.jd.com/gw/generic/bt/h5/m/helpFriend'
|
||||||
|
data='reqData='+quote('{"extMap":{"eid":"%s","fp":"%s","sdkToken":"","token":"%s","appType":"10","pageUrl":"https://btfront.jd.com/release/shareCouponRedemption/sharePage/?obtainActivityId=%s&channelId=17&channelName=pdy&jrcontainer=h5&jrcloseweb=false&jrlogin=true&inviteCode=%s"},"obtainActivityId":"%s","inviteCode":"%s"}'%(eid,fp,token,obtainActivityid,invitecode,obtainActivityid,invitecode))
|
||||||
|
headers={
|
||||||
|
'Host':'ms.jr.jd.com',
|
||||||
|
'Content-Type':'application/x-www-form-urlencoded',
|
||||||
|
'Origin':'https://btfront.jd.com',
|
||||||
|
'Accept-Encoding':'gzip, deflate, br',
|
||||||
|
'Cookie':ck,
|
||||||
|
'Connection':'keep-alive',
|
||||||
|
'Accept':'application/json, text/plain, */*',
|
||||||
|
'User-Agent':UserAgent,
|
||||||
|
'Referer':'https://btfront.jd.com/',
|
||||||
|
'Content-Length':str(len(data)),
|
||||||
|
'Accept-Language':'zh-CN,zh-Hans;q=0.9'
|
||||||
|
}
|
||||||
|
try:
|
||||||
|
response=requests.post(url=url,headers=headers,data=data)
|
||||||
|
if response.text.find('本次助力活动已完成')!=-1:
|
||||||
|
send('京东白条12期免息优惠券助力完成','去京东金融-白条-我的-我的优惠券看看吧')
|
||||||
|
printf('助力完成,程序即将退出!')
|
||||||
|
os._exit(0)
|
||||||
|
else:
|
||||||
|
if json.loads(response.text)['resultData']['result']['code']=='0000':
|
||||||
|
printf('助力成功')
|
||||||
|
elif json.loads(response.text)['resultData']['result']['code']=='M1003':
|
||||||
|
printf('该用户未开启白条,助力失败!')
|
||||||
|
elif json.loads(response.text)['resultData']['result']['code']=='U0002':
|
||||||
|
printf('该用户白条账户异常,助力失败!')
|
||||||
|
elif json.loads(response.text)['resultData']['result']['code']=='E0004':
|
||||||
|
printf('该活动仅限受邀用户参与,助力失败!')
|
||||||
|
else:
|
||||||
|
print(response.text)
|
||||||
|
except:
|
||||||
|
try:
|
||||||
|
print(response.text)
|
||||||
|
except:
|
||||||
|
printf('助力出错,可能是cookie过期了')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
remarkinfos={}
|
||||||
|
get_remarkinfo()
|
||||||
|
|
||||||
|
|
||||||
|
jdjrcookie=os.environ["JDJR_COOKIE"]
|
||||||
|
|
||||||
|
UserAgent=randomuserAgent()
|
||||||
|
info=JDSignValidator('https://jrmfp.jr.jd.com/')
|
||||||
|
eid=json.loads(geteid(info[1],info[2]).split('_*')[1])['eid']
|
||||||
|
fp=info[0]
|
||||||
|
token=gettoken()
|
||||||
|
activityid=getsharetasklist(jdjrcookie,eid,fp,token)
|
||||||
|
inviteinfo=obtainsharetask(jdjrcookie,eid,fp,token,activityid)
|
||||||
|
|
||||||
|
|
||||||
|
try:
|
||||||
|
cks = os.environ["JD_COOKIE"].split("&")
|
||||||
|
except:
|
||||||
|
f = open("/jd/config/config.sh", "r", encoding='utf-8')
|
||||||
|
cks = re.findall(r'Cookie[0-9]*="(pt_key=.*?;pt_pin=.*?;)"', f.read())
|
||||||
|
f.close()
|
||||||
|
for ck in cks:
|
||||||
|
ptpin = re.findall(r"pt_pin=(.*?);", ck)[0]
|
||||||
|
try:
|
||||||
|
if remarkinfos[ptpin]!='':
|
||||||
|
printf("--账号:" + remarkinfos[ptpin] + "--")
|
||||||
|
username=remarkinfos[ptpin]
|
||||||
|
else:
|
||||||
|
printf("--无备注账号:" + urllib.parse.unquote(ptpin) + "--")
|
||||||
|
username=urllib.parse.unquote(ptpin)
|
||||||
|
except:
|
||||||
|
printf("--账号:" + urllib.parse.unquote(ptpin) + "--")
|
||||||
|
username=urllib.parse.unquote(ptpin)
|
||||||
|
UserAgent=randomuserAgent()
|
||||||
|
info=JDSignValidator('https://jrmfp.jr.jd.com/')
|
||||||
|
eid=json.loads(geteid(info[1],info[2]).split('_*')[1])['eid']
|
||||||
|
fp=info[0]
|
||||||
|
token=gettoken()
|
||||||
|
assist(ck,eid,fp,token,inviteinfo.split('@')[0],inviteinfo.split('@')[1])
|
||||||
18
jd_m_sign.js
18
jd_m_sign.js
@@ -6,7 +6,7 @@
|
|||||||
===========================
|
===========================
|
||||||
[task_local]
|
[task_local]
|
||||||
#京东通天塔--签到
|
#京东通天塔--签到
|
||||||
3 0 * * * jd_m_sign.js, tag=京东通天塔--签到, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true
|
3 1,11 * * * jd_m_sign.js, tag=京东通天塔--签到, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const $ = new Env('京东通天塔--签到');
|
const $ = new Env('京东通天塔--签到');
|
||||||
@@ -64,14 +64,18 @@ async function jdsign() {
|
|||||||
try {
|
try {
|
||||||
console.log(`签到开始........`)
|
console.log(`签到开始........`)
|
||||||
await getInfo("https://pro.m.jd.com/mall/active/3S28janPLYmtFxypu37AYAGgivfp/index.html");//拍拍二手签到
|
await getInfo("https://pro.m.jd.com/mall/active/3S28janPLYmtFxypu37AYAGgivfp/index.html");//拍拍二手签到
|
||||||
await $.wait(1000)
|
await $.wait(2000)
|
||||||
await getInfo("https://pro.m.jd.com/mall/active/4QjXVcRyTcRaLPaU6z2e3Sw1QzWE/index.html");//全城购签到
|
|
||||||
await $.wait(1000)
|
|
||||||
await getInfo("https://prodev.m.jd.com/mall/active/3MFSkPGCDZrP2WPKBRZdiKm9AZ7D/index.html");//同城签到
|
|
||||||
await $.wait(1000)
|
|
||||||
await getInfo("https://pro.m.jd.com/mall/active/kPM3Xedz1PBiGQjY4ZYGmeVvrts/index.html");//陪伴
|
await getInfo("https://pro.m.jd.com/mall/active/kPM3Xedz1PBiGQjY4ZYGmeVvrts/index.html");//陪伴
|
||||||
await $.wait(1000)
|
await $.wait(2000)
|
||||||
await getInfo("https://pro.m.jd.com/mall/active/3SC6rw5iBg66qrXPGmZMqFDwcyXi/index.html");//京东图书
|
await getInfo("https://pro.m.jd.com/mall/active/3SC6rw5iBg66qrXPGmZMqFDwcyXi/index.html");//京东图书
|
||||||
|
await $.wait(2000)
|
||||||
|
await getInfo("https://prodev.m.jd.com/mall/active/412SRRXnKE1Q4Y6uJRWVT6XhyseG/index.html");//京东服装
|
||||||
|
// await getInfo("https://pro.m.jd.com/mall/active/ZrH7gGAcEkY2gH8wXqyAPoQgk6t/index.html");//箱包签到
|
||||||
|
// await $.wait(1000)
|
||||||
|
// await getInfo("https://pro.m.jd.com/mall/active/4RXyb1W4Y986LJW8ToqMK14BdTD/index.html");//鞋靴馆签到
|
||||||
|
|
||||||
|
// await $.wait(1000)
|
||||||
|
// await getInfo("https://pro.m.jd.com/mall/active/3joSPpr7RgdHMbcuqoRQ8HbcPo9U/index.html");//生活特权签到
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
$.logErr(e)
|
$.logErr(e)
|
||||||
}
|
}
|
||||||
|
|||||||
50
jd_nzmh.js
50
jd_nzmh.js
@@ -1,22 +1,35 @@
|
|||||||
/*
|
/*
|
||||||
#女装盲盒抽京豆任务,自行加入一下环境变量
|
女装盲盒
|
||||||
export jd_nzmhurl="https://anmp.jd.com/babelDiy/Zeus/2x36jyruNVDWxUiAiGAgHRrkqVX2/index.html"
|
活动时间:2021-3-1至2021-3-31
|
||||||
|
活动地址:https://anmp.jd.com/babelDiy/Zeus/3z12ngsd27UR1KfRqdMrMSSg3uxg/index.html
|
||||||
|
活动入口:京东app-女装馆-赢京豆
|
||||||
|
已支持IOS双京东账号,Node.js支持N个京东账号
|
||||||
|
脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js
|
||||||
|
============Quantumultx===============
|
||||||
|
[task_local]
|
||||||
|
#女装盲盒
|
||||||
|
35 1,23 * * * https://raw.githubusercontent.com/222222/sync/jd_scripts/jd_nzmh.js, tag=女装盲盒, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true
|
||||||
|
|
||||||
cron 35 1,23 * * *
|
================Loon==============
|
||||||
|
[Script]
|
||||||
|
cron "35 1,23 * * *" script-path=https://raw.githubusercontent.com/222222/sync/jd_scripts/jd_nzmh.js,tag=女装盲盒
|
||||||
|
|
||||||
|
===============Surge=================
|
||||||
|
女装盲盒 = type=cron,cronexp="35 1,23 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/222222/sync/jd_scripts/jd_nzmh.js
|
||||||
|
|
||||||
|
============小火箭=========
|
||||||
|
女装盲盒 = type=cron,script-path=https://raw.githubusercontent.com/222222/sync/jd_scripts/jd_nzmh.js, cronexpr="35 1,23 * * *", timeout=3600, enable=true
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const $ = new Env('女装盲盒抽京豆');
|
const $ = new Env('女装盲盒抽京豆');
|
||||||
const notify = $.isNode() ? require('./sendNotify') : '';
|
const notify = $.isNode() ? require('./sendNotify') : '';
|
||||||
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
|
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
|
||||||
//Node.js用户请在jdCookie.js处填写京东ck;
|
//Node.js用户请在jdCookie.js处填写京东ck;
|
||||||
//IOS等用户直接用NobyDa的jd cookie
|
//IOS等用户直接用NobyDa的jd cookie
|
||||||
let cookiesArr = [], cookie = '', message = '', allMessage = '';
|
let cookiesArr = [], cookie = '', message;
|
||||||
let jd_nzmhurl = 'https://anmp.jd.com/babelDiy/Zeus/3z12ngsd27UR1KfRqdMrMSSg3uxg/index.html';
|
|
||||||
if ($.isNode()) {
|
if ($.isNode()) {
|
||||||
Object.keys(jdCookieNode).forEach((item) => {
|
Object.keys(jdCookieNode).forEach((item) => {
|
||||||
cookiesArr.push(jdCookieNode[item])
|
cookiesArr.push(jdCookieNode[item])
|
||||||
})
|
})
|
||||||
if (process.env.jd_nzmhurl) jd_nzmhurl = process.env.jd_nzmhurl
|
|
||||||
if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {};
|
if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {};
|
||||||
} else {
|
} else {
|
||||||
cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item);
|
cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item);
|
||||||
@@ -26,11 +39,9 @@ if ($.isNode()) {
|
|||||||
$.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"});
|
$.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!jd_nzmhurl) {
|
console.log('女装盲盒\n' +
|
||||||
$.log(`暂时没有女装盲盒,改日再来~`);
|
'活动时间:2021-3-1至2021-3-31\n' +
|
||||||
return;
|
'活动地址:https://anmp.jd.com/babelDiy/Zeus/3z12ngsd27UR1KfRqdMrMSSg3uxg/index.html');
|
||||||
}
|
|
||||||
console.log(`新的女装盲盒已经准备好: ${jd_nzmhurl},准备开始薅豆`);
|
|
||||||
for (let i = 0; i < cookiesArr.length; i++) {
|
for (let i = 0; i < cookiesArr.length; i++) {
|
||||||
if (cookiesArr[i]) {
|
if (cookiesArr[i]) {
|
||||||
cookie = cookiesArr[i];
|
cookie = cookiesArr[i];
|
||||||
@@ -50,16 +61,12 @@ if ($.isNode()) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
await jdMh(jd_nzmhurl)
|
await jdMh('https://anmp.jd.com/babelDiy/Zeus/3z12ngsd27UR1KfRqdMrMSSg3uxg/index.html')
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
$.logErr(e)
|
$.logErr(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (allMessage) {
|
|
||||||
if ($.isNode()) await notify.sendNotify(`${$.name}`, `${allMessage}`);
|
|
||||||
$.msg($.name, '', allMessage);
|
|
||||||
}
|
|
||||||
})()
|
})()
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
$.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '')
|
$.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '')
|
||||||
@@ -88,7 +95,6 @@ function showMsg() {
|
|||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
if ($.beans) {
|
if ($.beans) {
|
||||||
message += `本次运行获得${$.beans}京豆`
|
message += `本次运行获得${$.beans}京豆`
|
||||||
allMessage += `京东账号${$.index}${$.nickName}获得${$.beans}京豆\n`
|
|
||||||
$.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`);
|
$.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`);
|
||||||
}
|
}
|
||||||
resolve()
|
resolve()
|
||||||
@@ -96,7 +102,7 @@ function showMsg() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getInfo(url) {
|
function getInfo(url) {
|
||||||
console.log(`\n女装盲盒url:${url}\n`)
|
console.log(`url:${url}`)
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
$.get({
|
$.get({
|
||||||
url,
|
url,
|
||||||
@@ -153,11 +159,15 @@ function doTask(taskId) {
|
|||||||
console.log(`${$.name} API请求失败,请检查网路重试`)
|
console.log(`${$.name} API请求失败,请检查网路重试`)
|
||||||
} else {
|
} else {
|
||||||
data = JSON.parse(data.match(/query\((.*)\n/)[1])
|
data = JSON.parse(data.match(/query\((.*)\n/)[1])
|
||||||
|
if (data.errcode === 8004) {
|
||||||
|
console.log(`任务完成失败,无效任务ID`)
|
||||||
|
} else {
|
||||||
if (data.data.complete_task_list.includes(taskId)) {
|
if (data.data.complete_task_list.includes(taskId)) {
|
||||||
console.log(`任务完成成功,当前幸运值${data.data.curbless}`)
|
console.log(`任务完成成功,当前幸运值${data.data.curbless}`)
|
||||||
$.userInfo.bless = data.data.curbless
|
$.userInfo.bless = data.data.curbless
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
$.logErr(e, resp)
|
$.logErr(e, resp)
|
||||||
} finally {
|
} finally {
|
||||||
@@ -205,7 +215,7 @@ function taskUrl(function_id, body = '') {
|
|||||||
'Content-Type': 'application/json;charset=utf-8',
|
'Content-Type': 'application/json;charset=utf-8',
|
||||||
'Origin': 'wq.jd.com',
|
'Origin': 'wq.jd.com',
|
||||||
'User-Agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)',
|
'User-Agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)',
|
||||||
'Referer': `${jd_nzmhurl}?wxAppName=jd`,
|
'Referer': `https://anmp.jd.com/babelDiy/Zeus/xKACpgVjVJM7zPKbd5AGCij5yV9/index.html?wxAppName=jd`,
|
||||||
'Cookie': cookie
|
'Cookie': cookie
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
25
jd_wish.js
25
jd_wish.js
@@ -5,17 +5,17 @@
|
|||||||
===============Quantumultx===============
|
===============Quantumultx===============
|
||||||
[task_local]
|
[task_local]
|
||||||
#众筹许愿池
|
#众筹许愿池
|
||||||
40 0,2 * * * https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_wish.js, tag=众筹许愿池, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true
|
40 0,2 * * * https://raw.githubusercontent.com/222222/sync/jd_scripts/jd_wish.js, tag=众筹许愿池, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true
|
||||||
|
|
||||||
================Loon==============
|
================Loon==============
|
||||||
[Script]
|
[Script]
|
||||||
cron "40 0,2 * * *" script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_wish.js,tag=众筹许愿池
|
cron "40 0,2 * * *" script-path=https://raw.githubusercontent.com/222222/sync/jd_scripts/jd_wish.js,tag=众筹许愿池
|
||||||
|
|
||||||
===============Surge=================
|
===============Surge=================
|
||||||
众筹许愿池 = type=cron,cronexp="40 0,2 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_wish.js
|
众筹许愿池 = type=cron,cronexp="40 0,2 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/222222/sync/jd_scripts/jd_wish.js
|
||||||
|
|
||||||
============小火箭=========
|
============小火箭=========
|
||||||
众筹许愿池 = type=cron,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_wish.js, cronexpr="40 0,2 * * *", timeout=3600, enable=true
|
众筹许愿池 = type=cron,script-path=https://raw.githubusercontent.com/222222/sync/jd_scripts/jd_wish.js, cronexpr="40 0,2 * * *", timeout=3600, enable=true
|
||||||
*/
|
*/
|
||||||
const $ = new Env('众筹许愿池');
|
const $ = new Env('众筹许愿池');
|
||||||
const notify = $.isNode() ? require('./sendNotify') : '';
|
const notify = $.isNode() ? require('./sendNotify') : '';
|
||||||
@@ -25,8 +25,8 @@ let message = '', allMessage = '';
|
|||||||
//IOS等用户直接用NobyDa的jd cookie
|
//IOS等用户直接用NobyDa的jd cookie
|
||||||
let cookiesArr = [], cookie = '';
|
let cookiesArr = [], cookie = '';
|
||||||
const JD_API_HOST = 'https://api.m.jd.com/client.action';
|
const JD_API_HOST = 'https://api.m.jd.com/client.action';
|
||||||
let appIdArr = ["1GFNRxq8","1GVFUx6g", "1E1xZy6s", "1GVJWyqg","1GFRRyqo"];
|
let appIdArr = ['1EFRQwA','1FFVQyqw','1E1xZy6s'];
|
||||||
let appNameArr = ["新年宠粉","JOY年味之旅","PLUS生活特权", "虎娃迎福","过新潮年"];
|
let appNameArr = ['疯狂砸金蛋','1111点心动','PLUS生活特权'];
|
||||||
let appId, appName;
|
let appId, appName;
|
||||||
$.shareCode = [];
|
$.shareCode = [];
|
||||||
if ($.isNode()) {
|
if ($.isNode()) {
|
||||||
@@ -72,18 +72,13 @@ if ($.isNode()) {
|
|||||||
if ($.isNode()) await notify.sendNotify($.name, allMessage);
|
if ($.isNode()) await notify.sendNotify($.name, allMessage);
|
||||||
$.msg($.name, '', allMessage)
|
$.msg($.name, '', allMessage)
|
||||||
}
|
}
|
||||||
let res = await getAuthorShareCode('https://raw.githubusercontent.com/Aaron-lv/updateTeam/master/shareCodes/wish.json')
|
let res = await getAuthorShareCode('https://raw.githubusercontent.com/222222/11111128/master/shareCodes/11111127')
|
||||||
if (!res) {
|
if (!res) {
|
||||||
$.http.get({url: 'https://purge.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/wish.json'}).then((resp) => {}).catch((e) => console.log('刷新CDN异常', e));
|
$.http.get({url: 'https://purge.jsdelivr.net/gh/222222/11111128@master/shareCodes/11111127'}).then((resp) => {}).catch((e) => console.log('刷新CDN异常', e));
|
||||||
await $.wait(1000)
|
await $.wait(1000)
|
||||||
res = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/wish.json')
|
res = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/222222/11111128@master/shareCodes/11111127')
|
||||||
}
|
}
|
||||||
let res2 = await getAuthorShareCode('https://raw.githubusercontent.com/zero205/updateTeam/main/shareCodes/wish.json')
|
$.shareCode = [...$.shareCode, ...(res || [])]
|
||||||
if (!res2) {
|
|
||||||
await $.wait(1000)
|
|
||||||
res2 = await getAuthorShareCode('https://raw.fastgit.org/zero205/updateTeam/main/shareCodes/wish.json')
|
|
||||||
}
|
|
||||||
$.shareCode = [...$.shareCode, ...(res || []), ...(res2 || [])]
|
|
||||||
for (let i = 0; i < cookiesArr.length; i++) {
|
for (let i = 0; i < cookiesArr.length; i++) {
|
||||||
if (cookiesArr[i]) {
|
if (cookiesArr[i]) {
|
||||||
cookie = cookiesArr[i];
|
cookie = cookiesArr[i];
|
||||||
|
|||||||
Reference in New Issue
Block a user