Ejemplo n.º 1
0
async def page_taskid(cookie,assignmentId,projectId):
    a=[]
    body={"type":"1","projectId":projectId,"assignmentId":assignmentId,"doneHide":False}
    a.append('获取主页面任务id🔎...')
    res=await taskPostUrl_3("interactive_info", body, cookie)
    if not res:
        return    
    if res['code']=='0':
        if res['success']:
            try:
                title=res['data'][0]['title']
                itemId=res['data'][0]['itemId']
                a=[aa+'\n' for aa in a]
                a=''.join(a)
                msg(a)
                return [title,itemId]
            except:
                a.append(f"没有找到任务id\n")    
        else:
            a.append(f"没有找到任务id\n") 
    else:
        a.append('错误⭕')
        a.append(f'{res}\n')    
    a=[aa+'\n' for aa in a]
    a=''.join(a)
    msg(a)
Ejemplo n.º 2
0
 def v4_cookie(self):
     a = []
     b = re.compile(r'Cookie' + '.*?=\"(.*?)\"', re.I)
     with open('/jd/config/config.sh', 'r') as f:
         for line in f.readlines():
             try:
                 regular = b.match(line).group(1)
                 a.append(regular)
             except:
                 pass
     return a
Ejemplo n.º 3
0
async def boost_lottery(cookie,assignmentId,projectId):
    a=[]
    a.append('开始抽奖...')
    body={"projectId":projectId,"assignmentId":assignmentId,"type":"13"}
    res=await taskPostUrl_5("interactive_done", body, cookie)
    if not res:
        return    
    if res['code']=='0' :
        if res['success']:
            try:
                a.append(res['data']['rewardMsg']+'\n')
            except:
                a.append(res['message']+'\n')
        else:
            a.append(res['message']+'\n')
    else:
        a.append(f'错误\n{res}\n')
    a=[aa+'\n' for aa in a]
    a=''.join(a)
    msg(a) 
Ejemplo n.º 4
0
async def boost_help(cookie,assignmentId,projectId,inviteId,agid_list):
    a=[]
    a.append(f'账号{get_pin(cookie)}去助力{inviteId}📑...')
    body={"projectId":projectId,"assignmentId":assignmentId,"type":"2","itemId":inviteId,"agid":agid_list}
    res=await taskPostUrl_5("interactive_done", body, cookie)
    if not res:
        return  
    if res['code']=='0' :
        if res['success']:
            try:
                b=res['data'][0]['msg']
                if '助力成功' in b:
                    a.append('助力成功✅\n')
            except:
                a.append(res['message']+'\n')
        else:
            a.append(res['message']+'\n')
    else:
        a.append(f'错误\n{res}\n')
    a=[aa+'\n' for aa in a]
    a=''.join(a)
    msg(a)         
Ejemplo n.º 5
0
async def boost(cookie,assignmentId,projectId,inviteId):
    body={"type":"2","projectId":projectId,"assignmentId":assignmentId,"doneHide":False,"helpType":"2","itemId":inviteId}
    res=await taskPostUrl_3("interactive_info", body, cookie)
    if not res:
        return    
    if res['code']=='0' :
        if res['success']:
            try:
                b=res['data'][0]['msg']
                if b=='可助力':
                    
                    return 1
            except:
                pass
        else:
            pass
    else:
        a=[]
        a.append('错误')
        a.append(f'{res}\n')
        a=[aa+'\n' for aa in a]
        a=''.join(a)
        msg(a)   
Ejemplo n.º 6
0
async def get_inviteId(cookie,assignmentId,projectId):
    a=[]
    global inviteId_list
    body={"type":"2","projectId":projectId,"assignmentId":assignmentId,"doneHide":False,"helpType":"1","itemId":""}
    a.append('获取邀请码🔎..')
    res=await taskPostUrl_3("interactive_info", body, cookie)
    if not res:
        return    
    if res['code']=='0' :
        if res['success']:
            try:
                # print(res)
                inviteId=res['data'][0]['itemId']
                if inviteId not in inviteId_list:
                    inviteId_list.append(inviteId)
                    a.append(f"账号{get_pin(cookie)}的邀请码是 {inviteId}✅\n")
                else:
                    a.append(f"已记录过该邀请码\n")
            except:
                a.append(f"没有找到邀请码\n")  
        else:
            a.append(f"没有找到邀请码\n")
    else:
        a.append('错误')
        a.append(f'{res}\n') 
    a=[aa+'\n' for aa in a]
    a=''.join(a)
    msg(a)
Ejemplo n.º 7
0
async def page_task(cookie,assignmentId,projectId,title,itemId):
    a=[]
    a.append(f'开始 {title}📑')
    body={"projectId":projectId,"assignmentId":assignmentId,"type":"1","itemId":itemId}
    res=await taskPostUrl_4("interactive_done", body, cookie)
    if not res:
        return    
    if res['code']=='0' :
        if res['success']:
            try:
                a.append(f"{res['data']['rewardMsg']}✅\n")
            except:
                a.append(f"{res['message']}\n")  
        else:
            a.append(f"{res['message']}\n")
    else:
        a.append('错误⭕')
        a.append(f'{res}\n')
    a=[aa+'\n' for aa in a]
    a=''.join(a)
    msg(a)
Ejemplo n.º 8
0
async def skuList_task(cookie,assignmentId,projectId,skuList):
    a=[]
    for sku in skuList:
        body={"type":"12","agid":[sku['agid']],"adid":sku['adid'],"projectId":projectId,"assignmentId":assignmentId}
        
        a.append(f"开始 {sku['name']}📑")
        res=await taskPostUrl_2("interactive_done", body, cookie)
        if not res:
            return    
        if res['code']=='0' :
            if res['success']:
                try:
                    a.append(f"{res['data']['rewardMsg']}✅\n")
                except:
                    a.append(f"{res['message']}\n")   
            else:
                a.append(f"{res['message']}\n")
        else:
            a.append('错误⭕')
            a.append(f'{res}\n')
    a=[aa+'\n' for aa in a]
    a=''.join(a)
    msg(a)
Ejemplo n.º 9
0
async def task_assignment(cookie,assignmentId,projectId,advGrpId1,advGrpId2):
    a=[]
    a.append(f"获取活动信息🔎...")
    body={"type":"12","projectId":projectId,"assignmentId":assignmentId,"agid":[advGrpId1,advGrpId2]}
    res=await taskPostUrl("interactive_info", body, cookie)
    if not res:
        return
    if res['code']=='0' :
        if res['success']:
            try:
                a.append(f"获取活动信息成功✅")
                # print(f"data数量 {len(res['data'])}")
                a.append(f"活动名称:{res['data'][0]['specialName']}📑")
                a.append(f"共 {len(res['data'][0]['skuList'])} 个子任务\n")
                a=[aa+'\n' for aa in a]
                a=''.join(a)
                msg(a)
                return [res['data'][0]['assignmentId'],res['data'][0]['projectId'],res['data'][0]['skuList']]
            except:
                a.append(f"找到 0 个活动信息\n")
        else:
            a.append(f"找到 0 个活动信息\n")
    else:
        a.append('错误⭕')
        a.append(f'{res}\n')
    a=[aa+'\n' for aa in a]
    a=''.join(a)
    msg(a)