腾讯视频V力值签到2.2

有坛友提醒腾讯视频签到脚本不好用。我试了下,好像是有点问题。。这次更新下代码。。
哎。顺便吐槽下腾讯视频VIP的话费。都抢不到,等级高了都没啥用。。不知道论坛有人抢得到话费不。。
更新代码(2021.3.27):
1.稍微美化下
2.添加了 额外签到每日抽奖
3.额外签到,需要7天手动签一次,会通知
【额外签到入口在:APP – 个人中心 – 顶部搜索按钮左边】
看不到“额外签到入口”,解决办法:
1.腾讯视频APP,找个QQ好友,关注,私信它地址。http://v.qq.com/x/bu/mobile_checkin。然后点击就能签到了
2.QQ里随便找个好友,发送 v.qq.com 点进去,随便点个电影,确定登录以后,,在发送 http://v.qq.com/x/bu/mobile_checkin 。点击。就能签到了

# -*- coding: utf8 -*-

import requests

import re

import time

from urllib.parse import quote

#tx_getVsToken:2019.12.1

def jiemi(str1):

i=5381

e=0

n=len(str1)

while e < n : i = i + (i<<5) + ord(str1[e]) e=e+1 #print(i) #print(i) res = 2147483647 & i #print(res) return str(res); #更新cookie def renew_cookie(cookie_list): #获取刷新cookie的地址,自动跳过更新失败的cookie res = requests.get('https://vm.gtimg.cn/tencentvideo_v1/script/txv.core.js?v=20191112').text url1 = re.search(r'authRefresh:o(.*?)",', res).group(1) auth_url = 'https://access.video.qq.com'+url1[2:] new_cookie_list = [] #循环更新cookie for cookie1 in cookie_list: try: s = requests.session() headers={'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.204 Safari/537.36','referer':'https://v.qq.com/','Cookie': cookie1} this_time = int(round(time.time() * 1000)) cookies_arr = cookie1.split('; ') for cookie2 in cookies_arr: c1 = cookie2.split('=') if c1[0] =='vqq_vusession': vqq_vusession = c1[1] #print('vqq_vusession:'+vqq_vusession ) vqq_vusession1 =jiemi(vqq_vusession) #print('vqq_vusession加密后:'+vqq_vusession1 ) url0 = auth_url + '&type=qq&g_tk=&g_vstk='+vqq_vusession1+'&g_actk=&_=' + str(this_time) #print(url0) res =s.get(url0,headers=headers).text #print('访问结果1:'+res) new_vus = re.search(r'vusession":"(.*?)","', res).group(1) cookie2 = cookie1.replace(vqq_vusession,new_vus) new_cookie_list.append(cookie2) except Exception: print('cookie更新失败【'+vqq_vuserid+'】,跳过。') continue return new_cookie_list def start(): try: s = requests.session() ###################需要修改的部分。 cookie1_list = ['。。。这里改成自己的COOKIE。。。'] serverj_url = 'https://sc.ftqq.com/SCU34934T12d12b0。。这里写自己的SERVER酱地址。07.send?text=' #################需要修改的部分结束。下面的不要动 this_time = int(round(time.time() * 1000)) login_url = 'https://vip.video.qq.com/fcgi-bin/comm_cgi?name=hierarchical_task_system&cmd=2&_=' + str(this_time) new_cookie_list = renew_cookie(cookie1_list) cookie2 = new_cookie_list[0] headers2={ 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.204 Safari/537.36', 'referer':'https://v.qq.com/', 'Cookie': cookie2 } #签到 res2 =s.get(login_url,headers=headers2).text print('签到结果:'+res2) #====================================QQd端额外签到 #使用新的cookies签到 #需要腾讯视频APP的USER-AGENT headers2={ 'User-Agent':'Mozilla/5.0 (Linux; Android 9; MI 6X Build/PKQ1.180904.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045120 Mobile Safari/537.36 QQLiveBrowser/8.0.5.20802', 'referer':'https://v.qq.com/', 'Cookie': cookie2 } #QQ端签到 res2 =s.get('http://v.qq.com/x/bu/mobile_checkin?isDarkMode=0&uiType=REGULAR',headers=headers2).text print('QQ端签到结果:'+str(len(res2))) #==================================QQ端额外签到结束 #抽奖 if 'class="card card_checked " data-day="7"' in res2: print('今天是第七天,开始抽奖,') choujiang_url1 = 'http://activity.video.qq.com/fcgi-bin/asyn_activity?otype=json&platform=3&magic_appid=2&app_type=1&type=90&act_id=106197&module_id=116049&option=8&days=7' choujiang_url2 = 'http://activity.video.qq.com/fcgi-bin/asyn_activity?otype=json&platform=3&magic_appid=2&app_type=1&type=90&act_id=106197&module_id=116049&option=6&days=7' res3 =s.get(choujiang_url1,headers=headers2).text res4 =s.get(choujiang_url2,headers=headers2).text print(res4) #成功:QQ端签到结果:49317 /失败:QQ端签到结果:8096//7天结束。需要APP端手动 if len(res2) <10000: requests.get(serverj_url + quote('腾讯视频额外签到失效,请APP手动签到一次~'+time.strftime('%Y.%m.%d',time.localtime(time.time()))) +'&desp='+quote('需要APP手动签到')) except Exception as e: print("地址访问失败,通知SERVER酱!") #print(e) requests.get(serverj_url + quote('腾讯视频自动签到失败~'+time.strftime('%Y.%m.%d',time.localtime(time.time()))) +'&desp='+quote('异常代码: '+str(e))) def main_handler(event, context): return start() if __name__ == '__main__': start() 复制代码 和上次的代码一样。修改2个地方就可以了~~(搜索"需要修改的部分"),修改单引号里的内容。其他不要动 使用方法参照上一个帖子: https://www.wnflb2020.com/forum.php?mod=viewthread&tid=146713

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注