Ejemplo n.º 1
0
Archivo: jd_wabao.py Proyecto: jsNO1/e
def main():
    msg('🔔发财挖宝,开始!\n')

    # msg('获取助力码\n')
    # global inviteCode_1_list,inviteCode_2_list
    # inviteCode_1_list=list()
    # inviteCode_2_list=list()
    # for cookie in cookie_list:
    #    inviteCode(cookie)

    # msg('互助\n')
    # inviteCode_2_list=inviteCode_2_list[:2]
    # for e,fcwbinviter in enumerate(inviteCode_2_list):
    #     fcwbinviteCode=inviteCode_1_list[e]
    #     for cookie in cookie_list:
    #         happyDigHelp(cookie,fcwbinviter,fcwbinviteCode)

    msg(f'====================共{len(cookie_list)}京东个账号Cookie=========\n')

    for e, cookie in enumerate(cookie_list, start=1):
        msg(f'******开始【账号 {e}】 {get_pin(cookie)} *********\n')
        happyDigHome(cookie)
        spring_reward_list(cookie)

    if run_send == 'yes':
        send('### 发财挖宝 ###')  # 通知服务
Ejemplo n.º 2
0
def draw(activityid,eid,fp):
    global sendNotifyflag
    global prizeAward
    sendNotifyflag=False
    prizeAward=0
    url='https://jrmkt.jd.com/activity/newPageTake/takePrize'
    data=f'activityId={activityid}&eid={eid}&fp={fp}'
    headers={
        'Host':'jrmkt.jd.com',
        'Accept':'application/json, text/javascript, */*; q=0.01',
        'X-Requested-With':'XMLHttpRequest',
        'Accept-Language':'zh-CN,zh-Hans;q=0.9',
        'Accept-Encoding':'gzip, deflate, br',
        'Content-Type':'application/x-www-form-urlencoded; charset=UTF-8',
        'Origin':'https://jrmkt.jd.com',
        'User-Agent':UserAgent,
        'Connection':'keep-alive',
        'Referer':'https://jrmkt.jd.com/ptp/wl/vouchers.html?activityId=Q029794F612c2E2O1D2a0N161v0Z2i2s9nJ&jrcontainer=h5&jrlogin=true&jrcloseweb=false',
        'Content-Length':str(len(data)),
        'Cookie':ck
        }
    response=requests.post(url=url,headers=headers,data=data)
    try:
        if json.loads(response.text)['prizeModels'][0]['prizeAward'].find('元')!=-1:
            printf('获得'+json.loads(response.text)['prizeModels'][0]['useLimit']+'的'+json.loads(response.text)['prizeModels'][0]['prizeName']+'\n金额:'+json.loads(response.text)['prizeModels'][0]['prizeAward']+'\n有效期:'+json.loads(response.text)['prizeModels'][0]['validTime']+'\n\n')
            if int((json.loads(response.text)['prizeModels'][0]['prizeAward']).replace('.00元',''))>=5:
                prizeAward=json.loads(response.text)['prizeModels'][0]['prizeAward']
                sendNotifyflag=True
        if json.loads(response.text)['prizeModels'][0]['prizeAward'].find('期')!=-1:
            printf(response.text)
            send('抽到白条分期券','去看日志')
    except:
        printf('出错啦,出错原因为:'+json.loads(response.text)['failDesc']+'\n\n')
    
    time.sleep(5)
Ejemplo n.º 3
0
def main():
    msg('🔔发现新宝藏,开始!\n')
    global inviteId_list,start
    start = time.time()
    inviteId_list=[]

    msg(f'====================共{len(cookie_list)}京东个账号Cookie=========\n')
    msg('已完成的任务会显示火爆,当然也可能你是黑号...\n')
    tasksss=[]
    for e,cookie in enumerate(cookie_list,start=1):
        msg(f'******开始【账号 {e}】 {get_pin(cookie)} *********\n')
        a=getUserInfo(cookie)
        if not a:
            return
        asyncio.run(task_id(cookie))
        # async def task_id_async(cookie):
        #     a=getUserInfo(cookie)
        #     if not a:
        #         return
        #     await task_id(cookie)
        # tasksss.append(task_id_async(cookie))
        # asyncio.run(task_id(cookie))
    # asyncio.run(asyncio.wait(tasksss))
    
    msg(f'\n\n====================开始内部助力=========\n')

    tasksss=[]
    for e,cookie in enumerate(cookie_list,start=1):
        tasksss.append(task_id_help(cookie))      
    done,p=asyncio.run(asyncio.wait(tasksss))
    ret = [d.result() for d in done]
    
    if run_send=='yes':
        send('### 发现新宝藏 ###')   # 通知服务
Ejemplo n.º 4
0
def main():
    msg('🔔牛牛福利社,开始!\n')
    msg(f'====================共{len(cookie_list)}京东个账号Cookie=========\n')

    global inviteCode_list
    inviteCode_list = list()

    for e, cookie in enumerate(cookie_list, start=1):
        msg(f'******开始【账号 {e}】 {get_pin(cookie)} *********\n')

        a = QueryPgTaskCfg(cookie)
        if not a:
            continue
        taskId_list = a[0]
        taskName_list = a[1]

        for f, taskId in enumerate(taskId_list):
            if drawUserTask(cookie, taskId, taskName_list[f]):
                UserTaskFinish(cookie, taskId)

        UserSignNew(cookie)
        if get_env('nnfls_Lucky') != 'no':
            LuckyTwistDraw(cookie)

    msg(f'====================助力=========\n')
    for inviteCode in inviteCode_list:
        for cookie in cookie_list:
            helpSign(cookie, inviteCode)

    msg('作者:wuye9999\n')
    msg('地址:https://github.com/wuye999/myScripts')
    if run_send == 'yes':
        send('牛牛福利社')  # 通知服务
Ejemplo n.º 5
0
def start():
    scriptName = '### 京喜工厂-开团 ###'
    print(scriptName)
    global cookiesList, userNameList, pinNameList, ckNum
    cookiesList, userNameList, pinNameList = getCk.iscookie()
    setUserNum = len(jxgc_kaituan)
    if setUserNum > 0:
        pass
    else:
        print("提示:你还没设置开团的账号,变量:export jxgc_kaituan=\"用户1&用户2\"")
        print(f"本次默认给【账号1】{userNameList[0]}开团")
        jxgc_kaituan.append(userNameList[0])
    getactiveId()
    for ckname in jxgc_kaituan:
        try:
            ckNum = userNameList.index(ckname)
        except Exception as e:
            try:
                ckNum = pinNameList.index(unquote(ckname))
            except:
                print(f"请检查被助力账号【{ckname}】名称是否正确?提示:助力名字可填pt_pin的值、也可以填账号名。")
                continue
        userName = userNameList[ckNum]
        s = 1
        for i in range(3):
            print(f"【{userNameList[ckNum]}】开始第{i+1}次开团")
            tuanId, surplusOpenTuanNum = CreateTuan(cookiesList[ckNum])
            if i+1 == 1:
                s_label = surplusOpenTuanNum
            else:
                if surplusOpenTuanNum == s_label:
                    print(f'好友没有助力机会了')
                    break
            if tuanId:
                u = 1
                for i in cookiesList:
                    if i == cookiesList[ckNum]:
                        u += 1
                        continue
                    if JoinTuan(i, tuanId, u, suser=userName, user=userNameList[cookiesList.index(i)]):
                        Award(cookiesList[ckNum], tuanId)
                        break
                    u += 1
            else:
                print(f'用户【{userName}】,今天已完成所有团。')
                break
            s += 1
        Award(cookiesList[ckNum], "")
    try:
        u = 1
        for name in countElectric.keys():
            if u == 1:
                msg("\n###【本次统计 {}】###\n".format(datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')))
            msg(f"账号【{name}】\n\t└成功领取电力:{countElectric[name]}")
            u += 1
        if '成功领取电力' in msg_info:
            send(scriptName, msg_info)
    except:
        pass
Ejemplo n.º 6
0
def start():
    try:
        scriptName = '### 全民开红包-助力 ###'
        print(scriptName)
        cookiesList, userNameList = getCk.iscookie()
        if qmkhb_isOrder == "true":
            for ck, user in zip(cookiesList, userNameList):
                print(f"### ☺️开始助力 {user}")
                try:
                    rid, total = getrid(ck)
                except Exception as e:
                    print(e)
                    continue
                for k, nickname in zip(cookiesList, userNameList):
                    if nickname == user:
                        print(f"\t└😓{user} 不能助力自己,跳过~")
                        continue
                    friendhelp(k, rid, nickname)
            msg("### 👌统计:")
            for i, u in zip(cookiesList, userNameList):
                rid, total = getrid(i)
                msg(f"账户🧧[{u}]:本场收益红包:{total}")
            msg("\n【活动入口】:京豆app-领券中心-锦鲤红包。")
        elif qmkhb_isOrder == "false":
            if not qmkhb_help:
                print(
                    "您未配置助力的账号,\n助力账号名称:可填用户名 或 pin的值不要; \nenv 设置 export qmkhb_help=\"Curtinlv&用户2\"  多账号&分隔\n本次退出。"
                )
                sys.exit(0)
            msg("### 👌统计:")
            for ckname in qmkhb_help:
                try:
                    ckNum = userNameList.index(ckname)
                except Exception as e:
                    try:
                        ckNum = userNameList.index(unquote(ckname))
                    except:
                        msg(f"请检查被助力账号【{ckname}】名称是否正确?提示:助力名字可填pt_pin的值、也可以填账号名。"
                            )
                        continue
                masterName = userNameList[ckNum]
                rid, total = getrid(cookiesList[ckNum])
                print(f"### ☺️开始助力 {masterName}")
                for ck, nickname in zip(cookiesList, userNameList):
                    if nickname == masterName:
                        print(f"\t└😓{masterName} 不能助力自己,跳过~")
                        continue
                    friendhelp(ck, rid, nickname)
                rid, total = getrid(cookiesList[ckNum])
                msg(f"账户🧧[{masterName}]:本场收益红包:{total}")
            msg("\n【活动入口】:京豆app-领券中心-锦鲤红包。")
        else:
            print("请检查qmkhb_isOrder 变量参数是否正确填写。")
        if isNotice:
            send(scriptName, msg_info)
        else:
            print("\n", scriptName, "\n", msg_info)
    except Exception as e:
        print("start", e)
Ejemplo n.º 7
0
def Account():
    with open('SConfig.json', 'r') as f:
        j = json.load(f)
    Feedback = '共计' + str(len(j['site'])) + "个站点需签到" + "\r\n" + "\r\n"
    print('共计' + str(len(j['site'])) + "个站点需签到")
    for v in j['site']:
        #url = ''
        #print("开始计算最快的服务器。。。")
        #U = [{}] * len(v['url'])
        #for i, vv in enumerate(v['url']):
        #    ms = Ping(str(vv).replace("http://", "").replace("https://", ""))
        #    U[i] = {"ms": f'{ms}', "url": vv}
        #U.sort(key=lambda x: x["ms"])
        #for vv in U:
        #    if vv['ms'] != "-1":
        #        url = vv['url']
        #        break
        url = v['url'][0]
        print("开始签到:" + url + "\r\n签到账号" + v['email'])
        Feedback = Feedback + url + "\r\n签到账号:" + v['email'] + "\r\n"
        # url = 'https://suying688.com'
        #Cookies = v['cookies']
        Cookies = login(url, v['email'], v['password'])
        if Cookies.count("=") > 0:
            v['cookies'] = Cookies
            case = SignIn(url, Cookies)
            Feedback = Feedback + "签到情况:" + case + "\r\n"
            print("签到情况:" + case + "\r\n")
            case = GetQuery(url, Cookies)
            Feedback = Feedback + case + "\r\n" + "\r\n"
            print(case + "\r\n" + "\r\n")
        else:
            Feedback = Feedback + "登录错误:" + Cookies + "\r\n"
            print("登录错误:" + Cookies + "\r\n")
        #if Cookies == "":
        #    #print(v)
        #    Cookies = login(url, v['email'], v['password'])
        #    if Cookies.count("=") > 0:
        #        v['cookies'] = Cookies
        #    else:
        #        Feedback = Feedback + "登录错误:" + Cookies + "\r\n"
        #else:
        #    if GetQuery(url, Cookies) == "-1":
        #        Cookies = login(url, v['email'], v['password'])
        #        if Cookies.count("=") > 0:
        #            v['cookies'] = Cookies
        #        else:
        #            Feedback = Feedback + "登录错误:" + Cookies + "\r\n"
        #    case = SignIn(url, Cookies)
        #    Feedback = Feedback + "签到情况:" + case + "\r\n"
        #    case = GetQuery(url, Cookies)
        #    Feedback = Feedback + case + "\r\n" + "\r\n"
    with open('SConfig.json', 'w') as f:
        json.dump(j, f, indent=4)
    #print(Feedback)
    sendNotify.send("机场签到通知", Feedback)
Ejemplo n.º 8
0
def loadToken():
    # cur_path = os.path.abspath(os.path.dirname(__file__))
    # send("当前路径:",cur_path)
    try:
        with open("/ql/config/auth.json", "r", encoding="utf-8") as f:
            data = json.load(f)
    except:
        # pass
        send("无法获取token", "")
    return data['token']
Ejemplo n.º 9
0
def main():
    msg('🔔东东农场-集勋章合成兑换奖励,开始!\n')
    msg(f'====================共{len(cookie_list)}京东个账号Cookie=========\n')

    for e, cookie in enumerate(cookie_list):
        msg(f'******开始【账号 {e+1}】 {get_pin(cookie)} *********\n')
        ffff = collect_getAwardInfo(cookie)
        if ffff:
            collect_exchangeAward(cookie)

    if run_send == 'yes':
        send('东东农场-集勋章合成兑换奖励')  # 通知服务
Ejemplo n.º 10
0
def main():
    msg('🔔冬香节送福利,开始!\n')
    msg(f'====================共{len(cookie_list)}京东个账号Cookie=========\n')

    for e, cookie in enumerate(cookie_list):
        msg(f'******开始【账号 {e+1}】 {get_pin(cookie)} *********\n')
        msg('开始领红包')
        spring_reward_receive(cookie)
        spring_reward_list(cookie)

    if run_send == 'yes':
        send('冬香节送福利')  # 通知服务
Ejemplo n.º 11
0
def start():
    try:
        scriptName = '### 东东萌宠-助力 ###'
        print(scriptName)
        cookiesList, userNameList, pinNameList = getCk.iscookie()
        if ddmc_isOrder == "true":
            for ck, master in zip(cookiesList, userNameList):
                print(f"### ☺️开始助力 {master}")
                sharecode = getShareCode(ck)
                for c, user in zip(cookiesList, userNameList):
                    if master == user:
                        print(f"\t└😓{user} 不能助力自己,跳过~")
                        continue
                    if ddmc(c, sharecode, user):
                        msg(f"☺️[{master}]已完成助力~")
                        getHelpAddedBonus(ck)
                        break
        elif ddmc_isOrder == "false":
            if not ddmc_help:
                print(
                    "您未配置助力的账号,\n助力账号名称:可填用户名 或 pin的值不要; \nenv 设置 export qmkhb_help=\"Curtinlv&用户2\"  多账号&分隔\n本次退出。"
                )
                sys.exit(0)
            for ckname in ddmc_help:
                try:
                    ckNum = userNameList.index(ckname)
                except Exception as e:
                    try:
                        ckNum = pinNameList.index(unquote(ckname))
                    except:
                        msg(f"请检查被助力账号【{ckname}】名称是否正确?提示:助力名字可填pt_pin的值、也可以填账号名。"
                            )
                        continue
                master = userNameList[ckNum]
                sharecode = getShareCode(cookiesList[ckNum])
                print(f"### ☺️开始助力 {master}")
                for c, user in zip(cookiesList, userNameList):
                    if master == user:
                        print(f"\t└😓{user} 不能助力自己,跳过~")
                        continue
                    if ddmc(c, sharecode, user):
                        msg(f"☺️[{master}]已完成助力~")
                        getHelpAddedBonus(cookiesList[ckNum])
                        break
        if isNotice:
            send(scriptName, msg_info)
        else:
            print("\n", scriptName, "\n", msg_info)
    except Exception as e:
        print(e)
Ejemplo n.º 12
0
def get_succeedinfo(ck):
    url = 'https://api.m.jd.com/client.action'
    headers = {
        'accept': 'application/json, text/plain, */*',
        'content-type': 'application/x-www-form-urlencoded',
        'origin': 'https://prodev.m.jd.com',
        'content-length': '249',
        'accept-language': 'zh-CN,zh-Hans;q=0.9',
        'User-Agent': userAgent(),
        'referer': 'https://prodev.m.jd.com/',
        'accept-encoding': 'gzip, deflate, br',
        'cookie': ck
    }
    data = f'appid=newtry&functionId=try_MyTrials&uuid={uuid}&clientVersion={clientVersion}&client=wh5&osVersion={iosVer}&area={area}&networkType=wifi&body=%7B%22page%22%3A1%2C%22selected%22%3A2%2C%22previewTime%22%3A%22%22%7D'
    response = requests.post(url=url, headers=headers, data=data)
    isnull = True
    try:
        for i in range(len(json.loads(response.text)['data']['list'])):
            if (json.loads(response.text)['data']['list'][i]['text']['text']
                ).find('试用资格将保留') != -1:
                print(
                    json.loads(response.text)['data']['list'][i]['trialName'])
                try:
                    if remarkinfos[ptpin] != '':
                        send(
                            "京东试用待领取物品通知", '账号名称:' + remarkinfos[ptpin] +
                            '\n' + '商品名称:' + json.loads(
                                response.text)['data']['list'][i]['trialName']
                            + "\n" + "商品链接:https://item.jd.com/" + json.loads(
                                response.text)['data']['list'][i]['skuId'] +
                            ".html")
                        isnull = False
                    else:
                        send(
                            "京东试用待领取物品通知",
                            '账号名称:' + urllib.parse.unquote(ptpin) + '\n' +
                            '商品名称:' + json.loads(
                                response.text)['data']['list'][i]['trialName']
                            + "\n" + "商品链接:https://item.jd.com/" + json.loads(
                                response.text)['data']['list'][i]['skuId'] +
                            ".html")
                        isnull = False
                except Exception as e:
                    printf(str(e))
        if isnull == True:
            print("没有在有效期内待领取的试用品\n\n")
    except:
        print('获取信息出错,可能是账号已过期')
        pass
Ejemplo n.º 13
0
def main():
    msg('🔔逛好物,赚京豆,开始!\n')
    msg(f'====================共{len(cookie_list)}京东个账号Cookie=========\n')
    # pool = Pool(p:=3)
    # msg(f'为节省时间,当前采用 {p} 账号并行\n')

    # for e,cookie in enumerate(cookie_list,start=1):
    #     pool.apply_async(func=getTaskList,args=(cookie,))

    # pool.close()
    # pool.join()

    [getTaskList(cookie) for cookie in cookie_list]
    
    if run_send=='yes':
        send('逛好物,赚京豆')   # 通知服务
Ejemplo n.º 14
0
Archivo: jd_xdz.py Proyecto: jsNO1/e
def main():
    msg('🔔星店长,开始!\n')

    msg(f'====================共{len(cookie_list)}京东个账号Cookie=========\n')

    for e, cookie in enumerate(cookie_list, start=1):
        msg(f'******开始【账号 {e}】 {get_pin(cookie)} *********\n')
        a = getUserInfo(cookie)
        if not a:
            return
        apDoTask(cookie)
        liulanhuic(cookie)
        pinpaixiaod(cookie)

    if run_send == 'yes':
        send('星店长')  # 通知服务
Ejemplo n.º 15
0
def start():
    scriptName = '### 全民抢京豆-助力 ###'
    print(scriptName)
    global cookiesList, userNameList, ckNum, beanCount, userCount
    cookiesList, userNameList = getCk.iscookie()
    for ckname in qjd_zlzh:
        try:
            ckNum = userNameList.index(ckname)
        except Exception as e:
            try:
                ckNum = userNameList.index(unquote(ckname))
            except:
                print(f"请检查被助力账号【{ckname}】名称是否正确?提示:助力名字可填pt_pin的值、也可以填账号名。")
                continue

        print(f"### 开始助力账号【{userNameList[int(ckNum)]}】###")
        groupCode, shareCode, sumBeanNumStr, activityId = getShareCode(
            cookiesList[ckNum])
        if groupCode == 0:
            msg(f"## {userNameList[int(ckNum)]}  获取互助码失败。请手动分享后再试~ 。")
            continue
        u = 0
        for i in cookiesList:
            if i == cookiesList[ckNum]:
                u += 1
                continue
            result = helpCode(i, groupCode, shareCode, userNameList[u], u + 1,
                              userNameList[int(ckNum)], activityId)
            time.sleep(sleepNum)
            if result:
                break
            u += 1
        groupCode, shareCode, sumBeanNumStr, activityId = getShareCode(
            cookiesList[ckNum])
        userCount[f'{userNameList[ckNum]}'] = sumBeanNumStr
        beanCount += sumBeanNumStr
    print("\n-------------------------")
    for i in userCount.keys():
        msg(f"账号【{i}】已抢京豆: {userCount[i]}")
    msg(f"## 今日累计获得 {beanCount} 京豆")
    try:
        if qjd_isNotice == "true":
            send(scriptName, msg_info)
    except:
        pass
Ejemplo n.º 16
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过期了')
Ejemplo n.º 17
0
def start():
    scriptName = '### 签到领现金-助力 ###'
    print(scriptName)
    global cookiesList, userNameList, pinNameList, ckNum, cashCount, cashCountdict
    cookiesList, userNameList, pinNameList = getCk.iscookie()
    for ckname in cash_zlzh:
        try:
            ckNum = userNameList.index(ckname)
        except Exception as e:
            try:
                ckNum = pinNameList.index(unquote(ckname))
            except:
                print(f"请检查被助力账号【{ckname}】名称是否正确?提示:助力名字可填pt_pin的值、也可以填账号名。")
                continue

        print(f"### 开始助力账号【{userNameList[int(ckNum)]}】###")
        inviteCode, shareDate = getShareCode(buildHeader(cookiesList[ckNum]))
        if inviteCode == 0:
            print(f"## {userNameList[int(ckNum)]}  获取互助码失败。请稍后再试!")
            continue
        u = 0
        for i in cookiesList:
            if i == cookiesList[ckNum]:
                u += 1
                continue
            result = helpCode(buildHeader(i), inviteCode, shareDate, u + 1,
                              userNameList[u], userNameList[ckNum])
            if result:
                break
            time.sleep(sleepNum)
            u += 1
        totalMoney = cash_exchangePage(cookiesList[ckNum])
        cashCount += totalMoney
        cashCountdict[userNameList[ckNum]] = totalMoney

    print("\n-------------------------")
    for i in cashCountdict.keys():
        msg(f"账号【{i}】当前现金: ¥{cashCountdict[i]}")
    msg("## 总累计获得 ¥%.2f" % cashCount)
    try:
        send(scriptName, msg_info)
    except:
        pass
Ejemplo n.º 18
0
def main():
    msg('🔔发财挖宝内部互助,开始!\n')
    msg(f'====================共{len(cookie_list)}京东个账号Cookie=========\n')

    msg('获取助力码\n')
    global inviteCode_1_list,inviteCode_2_list
    inviteCode_1_list=list()
    inviteCode_2_list=list()
    for cookie in cookie_list[:2]:
        inviteCode(cookie) 

    msg('\n互助\n')
    inviteCode_2_list=inviteCode_2_list[:2]
    for e,fcwbinviter in enumerate(inviteCode_2_list):
        fcwbinviteCode=inviteCode_1_list[e]
        for cookie in cookie_list:
            happyDigHelp(cookie,fcwbinviter,fcwbinviteCode)

    if run_send=='yes':
        send('### 发财挖宝内部互助 ###')   # 通知服务
Ejemplo n.º 19
0
def start():
    scriptName = '### 京喜工厂-开团 ###'
    print(scriptName)
    global cookiesList, userNameList, pinNameList, ckNum
    cookiesList, userNameList, pinNameList = getCk.iscookie()
    setUserNum = len(jxgc_kaituan)
    if setUserNum > 0:
        pass
    else:
        print("提示:你还没设置开团的账号,变量:export jxgc_kaituan=\"用户1&用户2\"")
        print(f"本次默认给【账号1】{userNameList[0]}开团")
        jxgc_kaituan.append(userNameList[0])
    for ckname in jxgc_kaituan:
        try:
            ckNum = userNameList.index(ckname)
        except Exception as e:
            try:
                ckNum = pinNameList.index(unquote(ckname))
            except:
                print(f"请检查被助力账号【{ckname}】名称是否正确?提示:助力名字可填pt_pin的值、也可以填账号名。")
                continue
        userName = userNameList[ckNum]

        for i in range(3):
            print(f"【{userNameList[ckNum]}】开始第{i+1}次开团")
            tuanId = CreateTuan(cookiesList[ckNum])
            u = 1
            for i in cookiesList:
                if i == cookiesList[ckNum]:
                    u += 1
                    continue
                if JoinTuan(i, tuanId, u, suser=userName, user=userNameList[cookiesList.index(i)]):
                    Award(cookiesList[ckNum], tuanId)
                    break
                u += 1
    try:
        if '获取电力' in msg_info:
            send(scriptName, msg_info)
    except:
        pass
Ejemplo n.º 20
0
def start():
    print(scriptHeader)
    isUpdate()
    outfile("Readme.md", readmes)
    cookiesList, userNameList = getCk.iscookie()
    userNum = len(cookiesList)
    msg(f"开始:{scriptName}")
    createShopidList()
    msg(f"获取到店铺:{shopidNum}")
    starttime = time.perf_counter()  # 记录时间开始
    for i in shopidList:
        body = buildBody(i)
        print(f"关注店铺【{i['shopid']}】")
        uNum = 1
        for ck, nickname in zip(cookiesList, userNameList):
            result = drawShopGift(ck, body)
            time.sleep(1.5)
            if result != 9:
                getGiftresult(result, nickname, nickname, uNum)
            else:
                uNum += 1
                break
            uNum += 1
    endtime = time.perf_counter()  # 记录时间结束
    msg("\n###【本次统计 {}】###\n".format(nowtime()))
    all_get_bean = 0
    n = 1
    for name, pinname in zip(userNameList, userNameList):
        try:
            userCountBean = usergetGiftinfo['{}'.format(pinname)]
            msg(f"账号{n}:【{name}】\n\t└收获 {userCountBean} 京豆")
            all_get_bean += userCountBean
        except Exception as e:
            msg(f"账号{n}:【{name}】\n\t└收获 0 京豆")
        n += 1
    msg(f"\n本次总累计获得:{all_get_bean} 京豆")
    msg("\n------- 总耗时 : %.03f 秒 seconds -------" % (endtime - starttime))
    print("{0}\n{1}\n{2}".format("*" * 30, scriptHeader, remarks))
    send(f"【{scriptName}】", message_info)
    exitCodeFun(0)
Ejemplo n.º 21
0
def main():
    msg('🔔双11组队竞猜赢大奖膨胀金助力,开始!\n')
    # global inviteId_list
    # inviteId_list=get_env('wy_swell')
    # if inviteId_list:
    #     inviteId_list=inviteId_list.split('&')
    msg(f'====================共{len(cookie_list)}京东个账号Cookie=========\n')
    # for e,cookie in enumerate(cookie_list,start=1):
    #     msg(f'******开始【账号 {e}】 {get_pin(cookie)} *********\n')
    # if not getUserInfo(cookie):
    #     continue
    # travel_pk_getExpandDetail(cookie)
    [travel_pk_receiveAward(cookie) for cookie in cookie_list]

    # if inviteId_list:
    #     for f,inviteId in enumerate(inviteId_list,start=1):
    #         try:
    #             for e,cookie in enumerate(cookie_list,start=1):
    #                 travel_pk_collectPkExpandScore(cookie,inviteId)
    #         except:
    #             msg('黑号吧\n')
    if run_send == 'yes':
        send('### 双11组队竞猜赢大奖膨胀金助力 ###')  # 通知服务
Ejemplo n.º 22
0
                    user_num = 1
                    for ck in cookies:
                        response = issmtg_obtainPrize(ck, user_num, prizeId,
                                                      areaId, periodId, title)
                        user_num += 1
                        if response == 2:
                            break
                    if response == 2:
                        break
            elif nowtime > qgendtime:
                break
            elif nowtime < unstartTime:
                printT("Sorry,还没到时间。")
                printT("【皮卡丘】建议cron: 59 23 * * *  python3 jd_blueCoin.py")
                break
            else:
                if a == 0:
                    a = 1
                    printT(f"正在等待,请勿终止退出...")
    except Exception as e:
        printT(e)


if __name__ == '__main__':
    start()
    try:
        if '成功兑换' in msg_info:
            send(script_name, msg_info)
    except:
        pass
Ejemplo n.º 23
0
Archivo: jd_btdraw.py Proyecto: jsNO1/e
        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:
        ck = ck.strip()
        if ck[-1] != ';':
            ck += ';'
        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://prodev.m.jd.com/mall/active/498THTs5KGNqK5nEaingGsKEi6Ao/index.html'
        )
        eid = json.loads(geteid(info[1], info[2]).split('_*')[1])['eid']
        fp = info[0]
        draw('Q029794F612c2E2O1D2a0N161v0Z2i2s9nJ', eid, fp)
        if sendNotifyflag:
            send('京东白条抽奖通知',
                 username + '抽到' + str(prizeAward) + '的优惠券了,速去京东金融-白条-天天试手气查看')
Ejemplo n.º 24
0
                from sendNotify import send
            except:
                self.getsendNotify()
                try:
                    from sendNotify import send
                except:
                    print("加载通知服务失败~")
        else:
            self.getsendNotify()
            try:
                from sendNotify import send
            except:
                print("加载通知服务失败~")


if __name__ == '__main__':
    # 启动通知服务
    msg().main()

    # msg打印控制台同时会记录日志在message(),后面统一发送
    print("\n打印在控制台的信息:")
    msg("Hello ! ")
    print("Test ")  # 不会记录
    msg("My name is Curtin. ")

    # 发送到通知服务(如tg机器人、企业微信等)
    message = msg().message()
    send("标题", message)
    print("\n发送到通知服务的信息:")
    print(message)
Ejemplo n.º 25
0
def start():
    global shareuserid4minipg, Masternickname, shareUuid
    isok, hdtitle, readme, code, footer = isUpdate()
    if not isok and readme:
        printf(readme)
        exit(0)
    printf(f"开始:【{hdtitle}】")
    shareUuid = code.split("&")[0]
    shareuserid4minipg = code.split("&")[1]
    cookieList, nameList = getCk.iscookie()
    a = 1
    # try:
    for ck, user in zip(cookieList, nameList):
        printf(f"##☺️用户{a}【{user}】")
        try:
            cookie = buildheaders(ck, shareUuid, shareuserid4minipg)
            sleep(0.2)
            token = isvObfuscator(ck)
        except:
            printf(f"️##😭用户{a}【{user}】获取token异常, ip有可能给限制了~")
            a += 1
            continue
        sleep(0.1)
        try:
            header, nickname, pin, AUTH_C_USER = getMyPing(
                shareUuid, shareuserid4minipg, cookie, token)
        except:
            printf(f"️##😭用户{a}【{user}】暂无法参加活动~")
            a += 1
            continue
        try:
            sleep(0.3)
            yunMidImageUrl, pin, nickname = getUserInfo(header, pin)
            sleep(0.3)
            header = accessLog(header, pin, shareUuid, shareuserid4minipg,
                               AUTH_C_USER)
            sleep(0.3)
            actorUuid, shareTitle = activityContent(header, pin, shareUuid,
                                                    yunMidImageUrl, nickname)
            # 关注
            sleep(0.3)
            followShop(header, actorUuid, pin, shareUuid, user)
            # 加购
            sleep(0.3)
            saveTask(header, pin, actorUuid, user)
            printf("#去完成开卡任务~")
            # 开卡
            venderIdList, channelList, score1, score2 = checkOpenCard(
                header, actorUuid, shareUuid, pin)
            if len(venderIdList) > 0:
                for i in range(10):
                    sleep(1)
                    insertCrmPageVisit(header, pin, i)
                bindWithVender(ck, venderIdList, channelList)
                printf("#去抽奖~")
                for i in range(2):
                    sleep(5)
                    startDraw(header, actorUuid, pin, user, i)
            else:
                printf("\t😆任务已完成!")
            for i in range(2):
                startDraw(header, actorUuid, pin, user, i)
            if a == 1:
                printf(f"用户{a}[{nickname}]>助力>>[Author]{shareUuid}")
                shareuserid4minipg = pin
                shareUuid = actorUuid
                Masternickname = nickname
                a += 1
                continue
            printf(f"用户{a}[{nickname}]>>助力>>>[{Masternickname}]{shareUuid}")
            a += 1
        except:
            continue
    # 抽奖
    a = 1
    shareUuid = 'bc5f8aab60ad47ab8249c5a58c3e00d5'
    shareuserid4minipg = 'wqdHuFdMJj0bcG7ysk0r8mwklxRrP5C78lmKjh9Mn4avAmNuF4i+OHS9NlRdtagP'
    for ck, user in zip(cookieList, nameList):
        printf(f"##☺️用户{a}【{user}】")
        try:
            cookie = buildheaders(ck, shareUuid, shareuserid4minipg)
            sleep(0.2)
            token = isvObfuscator(ck)
        except:
            printf(f"️##😭用户{a}【{user}】获取token异常, ip有可能给限制了~")
            a += 1
            continue
        sleep(0.1)
        try:
            header, nickname, pin, AUTH_C_USER = getMyPing(
                shareUuid, shareuserid4minipg, cookie, token)
        except:
            printf(f"️##😭用户{a}【{user}】暂无法参加活动~")
            a += 1
            continue
        sleep(0.3)
        try:
            yunMidImageUrl, pin, nickname = getUserInfo(header, pin)
            header = accessLog(header, pin, shareUuid, shareuserid4minipg,
                               AUTH_C_USER)
            actorUuid, shareTitle = activityContent(header, pin, shareUuid,
                                                    yunMidImageUrl, nickname)
            getDrawRecordHasCoupon(header, pin, actorUuid, user)
            venderIdList, channelList, score1, score2 = checkOpenCard(
                header, actorUuid, shareUuid, pin)
            bindWithVender(ck, venderIdList, channelList)
            for i in range(2):
                startDraw(header, actorUuid, pin, user, i)
            if a == 1:
                shareUuid = actorUuid
                shareuserid4minipg = pin
            a += 1
        except:
            continue
    msg("*" * 40)
    msg("### 【本次】")
    allbean = 0
    for k in countbean:
        msg(f"用户[{k}], 获得京豆:{countbean[k]}")
        allbean += countbean[k]
    msg("*" * 40)
    msg("### 【累计】")
    allUserBean = 0
    for c in allList:
        usetBean = 0
        try:
            msg(f"用户{nameList.index(c['id']) + 1} [{c['id']}]累计获得京豆:")
            for i in c:
                if i == 'id':
                    continue
                msg(f"\t└{i}: {c[i]}")
                if '京豆' in i:
                    usetBean += c[i]
                    allUserBean += c[i]
            msg(f"\t└累计获得京豆: {usetBean}")
        except:
            continue
        msg('-' * 20)
    msg(f"本次总获得: {allbean} 京豆")
    msg(f"累计总获得: {allUserBean} 京豆")
    msg("*" * 40)
    msg(footer)
    if isNotice == "true":
        send(hdtitle, msg_info)
Ejemplo n.º 26
0
    
if __name__ == '__main__':
    printf('游戏入口:京东金融-白条-中间横幅6666元\n')
    remarkinfos={}
    get_remarkinfo()
    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://prodev.m.jd.com/mall/active/498THTs5KGNqK5nEaingGsKEi6Ao/index.html')
        eid=json.loads(geteid(info[1],info[2]).split('_*')[1])['eid']
        fp=info[0]
        draw('C9z2s20071Z2p58191i0Z128616921QH',eid,fp)
        if sendNotifyflag:
            send('京东白条灯火星河闹元宵抽奖通知',username+'抽到'+str(prizeAward)+'的优惠券了')
Ejemplo n.º 27
0
def start():
    global shareuserid4minipg, Masternickname, one_shareUuid, one_shareuserid4minipg, one_name
    if datetime.datetime.now() > datetime.datetime.strptime(
            '2022-1-30', "%Y-%m-%d"):
        printf("活动结束\n请删掉脚本")
        exit(3)
    isok, hdtitle, readme, code, footer = isUpdate()
    if not isok and readme:
        printf(readme)
        exit(0)
    printf(f"开始:【{hdtitle}】")
    one_name = '仅账号一作者,其他全部助力账号一'
    one_shareUuid = code
    one_shareuserid4minipg = master_shareuserid4minipg
    cookieList, nameList = getCk.iscookie()
    a = 1
    for ck, user in zip(cookieList, nameList):
        try:
            printf(f"##☺️账号{a}[{user}],您好!")
            printf(f"\t└助力:[{one_name}] 助力码:{one_shareUuid}")
            try:
                cookie = buildheaders(ck, one_shareUuid,
                                      one_shareuserid4minipg)
                wait_time(1, 1)
                token = isvObfuscator(ck)
            except:
                printf(f"️##😭账号{a}【{user}】获取token异常, ip有可能给限制了~")
                a += 1
                continue
            wait_time(1, 2)
            header, nickname, pin = getMyPing(cookie, token)
            if not header:
                if a == 1:
                    printf(f"️##😭账号{a}【{user}】暂无法参加活动~")
                    exit(2)
                else:
                    printf(f"{user}:账号异常,不能参加活动")
                    a += 1
                    continue

            wait_time(1, 3)
            # try:
            yunMidImageUrl, pin, nickname = getUserInfo(header, pin)
            if not yunMidImageUrl:
                if a == 1:
                    printf(f"{user}:请检查账号是否正常~")
                    exit(2)
                else:
                    printf(f"{user}:账号异常,不能参加活动")
                    a += 1
                    continue
            wait_time(1, 3)
            header = accessLog(header, pin, one_shareUuid,
                               one_shareuserid4minipg)
            wait_time(1, 2)
            # 关注
            followShop(header, pin, user)
            wait_time(1, 2)
            # 加购
            addCart(header, pin, user)
            wait_time(2, 4)
            #领券获取金币
            wait_time(2, 4)
            sendAllCoupon(header, pin, user)
            # 开卡
            printf("#去完成开卡任务~")
            venderIdList, channelList, allShopID = checkOpenCard(header, pin)
            wait_time(1, 3)
            bindWithVender(ck, venderIdList, channelList, pin, header)
            # 浏览任务
            goodsCodeList = goodsCode(header, pin, user)
            printf("\t😆已完成浏览任务")
            for i in goodsCodeList:
                wait_time(1, 2, f"浏览任务{i}")
                if header:
                    header = browseShops(header, pin, i, '5')
            printf(f"已完成浏览任务")
            wait_time(2, 3)
            # printf(f"#去做底部浏览店铺任务")
            # for i in allShopID:
            #     wait_time(1, 2, f"浏览任务{i}")
            #     if header:
            #         header = browseShops(header, pin, i, '4')
            # printf(f"已完成底部浏览店铺任务")
            # wait_time(2, 3)
            # 抽奖
            # header = accessLog(header, pin, one_shareUuid, one_shareuserid4minipg)
            wait_time(1, 2)
            actorUuid, shareTitle, score = activityContent(
                header, pin, one_shareUuid, yunMidImageUrl, nickname,
                one_shareuserid4minipg)
            # printf(score)
            if score > 100:
                for i in range(int(score / 100)):
                    wait_time(2, 4, f"点击抽奖{i+1}")
                    if header:
                        header = draw(header, pin, actorUuid, user)
                    else:
                        break
            if a == 1:
                if actorUuid == 0:
                    printf("账号一获取助力码失败~,请重新尝试运行。")
                    exit(1)
                one_shareUuid = actorUuid
                one_shareuserid4minipg = pin
                one_name = user
            wait_time(1, 2)
            printf(f"## {user} 的助力码 {actorUuid}")
            assist(header, pin, one_shareUuid)
            if not a == len(cookieList):
                a += 1
                wait_time(kk_vip_sleep, kk_vip_sleep, "###休息一会")
        except Exception as e:
            printf(f"ERROR MAIN {e}")
            if a == 1:
                exit(0)
            a += 1
            continue

    a = 1
    printf("\n【收获统计】")
    scoreTotalList, myRankList, userList, scoreList = [], [], [], []
    one_shareUuid = code
    one_shareuserid4minipg = master_shareuserid4minipg
    for ck, user in zip(cookieList, nameList):
        try:
            try:
                cookie = buildheaders(ck, one_shareUuid,
                                      one_shareuserid4minipg)
                wait_time(0, 1)
                token = isvObfuscator(ck)
            except:
                printf(f"️##😭账号{a}【{user}】获取token异常, ip有可能给限制了~")
                a += 1
                continue
            wait_time(0, 1)
            header, nickname, pin = getMyPing(cookie, token)
            if not header:
                if a == 1:
                    printf(f"️##😭账号{a}【{user}】暂无法参加活动~")
                    exit(2)
                else:
                    printf(f"{user}:账号异常,不能参加活动")
                    a += 1
                    continue
            wait_time(0, 1)
            wait_time(0, 1)
            actorUuid, shareTitle, score = activityContent(
                header, pin, one_shareUuid, '', nickname,
                one_shareuserid4minipg)
            # 获取金牌信息、排行榜
            scoreTotal, myRank = getlist(header, pin, user)
            scoreTotalList.append(scoreTotal)
            scoreList.append(score)
            myRankList.append(myRank)
            userList.append(user)
            # 奖品
            record(header, pin, actorUuid, user)
            assist(header, pin, one_shareUuid)
            if a == 1:
                one_shareUuid = actorUuid
                one_shareuserid4minipg = pin
                one_name = user
            a += 1
        except Exception as e:
            printf(f"抽奖统计 {e}")
            a += 1
            continue

    msg("*" * 40)
    allBean = 0
    allJiangpin = ""
    n = 0
    a = 1
    for u in userList:
        try:
            msg(f"账号{a}[{u}] \n\t└当前金币{scoreList[n]} 累计金币{scoreTotalList[n]} 排名{myRankList[n]}"
                )
            for m in allUserBean:
                if m == u:
                    msg(f"\t\t└获得京豆: {allUserBean[u]}")
                    allBean += allUserBean[u]
                if m == f'{u}_yes':
                    msg(f"\t\t└获得奖品: {allUserBean[f'{u}_yes']}")
                    allJiangpin += "+" + allUserBean[f'{u}_yes']
            a += 1
            n += 1
        except:
            a += 1
            n += 1
            continue
    if allBean > 0:
        msg(f"总获得京豆: {allBean} ")
    if allJiangpin:
        msg(f"总获得奖品: {allJiangpin}")
    msg("*" * 40)
    msg(footer)
    if isNotice == "true":
        send(hdtitle, msg_info)
Ejemplo n.º 28
0
        print(e)


if __name__ == '__main__':
    print("============脚本只支持青龙新版=============\n")
    print("具体教程以文本模式打开文件,查看顶部教程\n")
    print("============执行滴滴多走多赚兑换脚本==============")
    # print(Didi_jifen_token)
    if Didi_jifen_token != '':
        xpsid = get_xpsid()
        exchange(Didi_jifen_token, xpsid, account, exchange_jkd_numb)
    elif tokens == '':
        print("检查变量Didi_jifen_token是否已填写")
    elif len(tokens) > 1:
        account = 1
        ttt = []
        for i in tokens:  #同时遍历两个list,需要用ZIP打包
            xpsid = get_xpsid()
            thread = threading.Thread(target=exchange,
                                      args=(i, xpsid, account,
                                            exchange_jkd_numb))
            ttt.append(thread)
            thread.start()
            account += 1
        for thread in ttt:
            thread.join()
    if "已兑换" in msg_info:
        send("滴滴多走多赚兑换", msg_info)
    elif "过期" in msg_info:
        send("滴滴多走多赚兑换", msg_info)
Ejemplo n.º 29
0
def start():
    Cent = {}

    def op(headers, _type=True):
        Ci = []
        url = 'https://wq.jd.com/bases/orderlist/list?order_type=8&start_page=1&page_size=100'
        if not _type:
            url = 'https://wq.jd.com/bases/orderlist/list?order_type=6&start_page=1&page_size=10'
        he = headers
        he['referer'] = 'https://wqs.jd.com/order/orderlist_merge.shtml?jxsid=16355625882984298965&orderType=all&ptag=7155.1.11'
        # try:
        if True:
            req = requests.get(url, headers=he)
            data = req.json()
            for i, da in enumerate(data['orderList']):
                oid = da['orderId']
                pid = da['productList'][0]['skuId']
                name = da['productList'][0]['title']
                cname = None
                multi = False if len(da['productList']) == 1 else True
                for j in da['buttonList']:
                    if j['id'] == 'toComment':
                        cname = j['name']  # 评价按钮名字
                if cname is None:
                    #printf("没获得到按钮数据,跳过这个商品!")
                    continue

                Ci.append({
                    'name': name,
                    'oid': oid,
                    'pid': pid,
                    'cname': cname,
                    'multi': multi
                })
        # except:
        #     printf('获取评价出错,可能ck失效')
        #     exit()
        return Ci

    # 评价和服务评价
    def ordinary(headers, ce):
        url = "https://wq.jd.com/eval/SendEval?g_login_type=0&g_ty=ajax"
        for i, da in enumerate(op(headers)):
            se_url = f'https://wq.jd.com/eval/SendDSR'
            se_data = {
                # 'pin': '%E9%82%B1%E5%B8%85%E7%9A%AE%E7%9A%AE%E8%99%BE',
                'userclient': '29',
                'orderId': da["oid"],
                'otype': random.randint(3, 5),
                'DSR1': random.randint(3, 5),
                'DSR2': random.randint(3, 5),
                'DSR3': random.randint(3, 5),
                'DSR4': random.randint(3, 5),
                'g_login_type': '0',
                'g_ty': 'ls'
            }
            xing, context = generation(da['name'])
            data = {
                'productId': da['pid'],
                'orderId': da['oid'],
                'score': xing,
                'content': context,
                'commentTagStr': 1,
                'userclient': 29,
                'scence': 101100000
            }
            he = headers

            def pjsj():
                req = requests.post(url, headers=he, data=data)
                if req.json()['errMsg'] == 'success':
                    #printf("\t普通评价成功!!")
                    Cent[ce]['评价'] += 1
                else:
                    printf("\t普通评价失败了.......")
                    printf(data)

            def pjfw():
                se_req = requests.get(se_url, headers=he, params=se_data)
                if se_req.json()['errMsg'] == 'success':
                    #printf("\t服务评价成功!!")
                    Cent[ce]['服务评价'] += 1
                else:
                    printf("\t服务评价失败了.......")
                    printf(se_data)

            printf(f'开始评论{i}\t[{da["oid"]}]')

            if da['cname'] == "评价晒单":
                pjsj()
                pjfw()
            elif da['cname'] == '评价服务':
                pjfw()
            elif da['cname'] == '追加评价':
                pass
            else:
                printf(da['cname'])
            #printf('等待5秒-可持续发展!')
            time.sleep(5)

    # 晒单
    def sunbw(headers, ce):
        url = "https://wq.jd.com/eval/SendEval?g_login_type=0&g_ty=ajax"
        for i, da in enumerate(op(headers, _type=False)):
            if da['cname'] == "追加评价":
                context = generation(da['name'], _type=0)
                printf(f'开始晒单{i},{da["oid"]}')
                if da['multi']:
                    #printf('\t多个商品跳过!')
                    continue
                url = 'https://comment-api.jd.com/comment/appendComment?sceneval=2&g_login_type=1&g_ty=ajax'
                data = {
                    'productId':
                    da['pid'],
                    'orderId':
                    da['oid'],
                    'content':
                    context,
                    'userclient':
                    29,
                    'imageJson':
                    random.sample([
                        '//img30.360buyimg.com/shaidan/jfs/t1/139511/17/26249/850/61852a35Ea7906339/f7eb6b9438917f30.jpg',
                        '//img30.360buyimg.com/shaidan/jfs/t1/143995/15/24443/5327/61860ba4Ecba97817/d7faafa606f76b1f.jpg'
                    ], 1)
                }
                try:
                    req = requests.post(url, headers=headers, data=data)
                    if req.json()['data']['result'] != {}:
                        #printf("\t晒单成功!!!")
                        Cent[ce]['晒单'] += 1
                    else:
                        printf("\t晒单失败...")
                        printf(req.json())
                        #printf('等待5秒-可持续发展!')
                    time.sleep(5)
                except Exception as e:
                    printf("出错了")
                    printf(e)

    printf('### 开始批量评价 ###')
    global cookiesList, userNameList, pinNameList, ckNum, beanCount, userCount
    cookiesList, userNameList, pinNameList = getCk.iscookie()

    for i, ck, user, pin in zip(range(1,
                                      len(cookiesList) + 1), cookiesList,
                                userNameList, pinNameList):

        printf(f"** 开始[账号{i}]-{user} **")
        headers = {
            'cookie':
            ck,
            'user-agent':
            'jdltapp;android;1.0.0;9;860105045422157-bce2658d9db5;network/wifi;model/JKM-AL00a;addressid/0;aid/5d84f5872ec4e5c8;oaid/51fe75e7-7e5d-aefc-fbed-ffffdf7f6bd2;osVer/28;appBuild/694;psn/860105045422157-bce2658d9db5|3;psq/26;uid/860105045422157-bce2658d9db5;adk/;ads/;pap/JA2020_3112531|1.0.0|ANDROID',
        }
        Cent[f'账号{i}[{user}]'] = {'评价': 0, '晒单': 0, '服务评价': 0}
        printf('开始评价与服务评价!')
        try:
            ordinary(headers, f'账号{i}[{user}]')

        except Exception as e:
            printf("评价出错了")
            printf(e)

        printf('等待10秒,继续')
        time.sleep(10)
        printf('开始晒单了')

        try:
            sunbw(headers, f'账号{i}[{user}]')
        except Exception as e:
            printf("晒单出错了")
            printf(e)
        printf('完成!!。等待10秒')
        time.sleep(10)
    msg = ''
    for i in Cent:
        msg += f'{i}\n{Cent[i]}\n\n'
    send('京东全自动评价', msg)
Ejemplo n.º 30
0
                    for i, j in zip (taskName_list2, taskId_list2):
                        print (i, j, k)
                        do_fertilizer_task2 (cookie, i, j, k, account)  # 浏览
                    for i, j in zip (taskName_list3, taskId_list3):
                        print (i, j, k)
                        do_fertilizer_task3 (cookie, i, j, k, account)  # 加购

                    if choose_plant_id == 'false':
                        for i in planted_id_list:
                            fertilization (cookie, i, k, account)
                            watering (cookie, i, sid, account)
                    else:
                        print("【账号{}现在开始施肥】".format(account))
                        fertilization (cookie, planted_id_list[flag], k, account)
                        print ("【账号{}现在开始浇水】".format (account))
                        watering (cookie, planted_id, sid, account)
                    flag += 1
            except Exception as e:
                pass
    else:
        printT ("请检查变量plant_cookie是否已填写")


if __name__ == '__main__':
    printT ("美丽研究院-种植园")
    start ()
    # if '成熟' in msg_info:
    #     send ("美丽研究院-种植园", msg_info)
    if '成功' in msg_info:
        send ("美丽研究院-种植园", msg_info)