├── tencent_video.zip
├── config.json
├── README.md
├── push.py
└── index.py
/tencent_video.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raindrop-hb/tencent-video/HEAD/tencent_video.zip
--------------------------------------------------------------------------------
/config.json:
--------------------------------------------------------------------------------
1 | {
2 | /* 开源地址: https://github.com/raindrop-hb/tencent-video */
3 | "version": "1.06",
4 | "users": [
5 | {
6 | "tag": "等花开",
7 | /* 填写cookie中某些段 */
8 | "vdevice_qimei36": "066a2100012316509",
9 | "vqq_appid": "104",
10 | "vqq_openid": "C51C0A429312322BDB",
11 | "vqq_access_token": "08A8606E2190",
12 | "vqq_vuserid": "227",
13 | "main_login": "qq",
14 | "ip": "39.144.36.110",
15 | /* 是否开启 */
16 | "enable": "False"
17 | },
18 | {
19 | /* 账号2 */
20 | "tag": "raindrop",
21 | /* 填写cookie中某些段 */
22 | "vdevice_qimei36": "066ab9df6590012316509",
23 | "vqq_appid": "1014",
24 | "vqq_openid": "3E68D4BDBAE9087CB42E",
25 | "vqq_access_token": "2B36FC45E3959216",
26 | "vqq_vuserid": "378",
27 | "main_login": "qq",
28 | "ip": "39.144.36.110",
29 | /* 是否开启 */
30 | "enable": "False"
31 | },
32 | {
33 | /* 账号3 */
34 | "vdevice_qimei36": "",
35 | "vqq_appid": "",
36 | "vqq_openid": "",
37 | "vqq_access_token": "",
38 | "vqq_vuserid": "",
39 | "main_login": "",
40 | "ip": "39.144.36.110",
41 | /* 是否开启 */
42 | "enable": "False"
43 | }
44 | ],
45 | "push": {
46 | "WeCom": {
47 | /* 是否企业微信推送 */
48 | "push": "False",
49 | /* 企业ID */
50 | "corpid": "ww0fc74e",
51 | /* 应用的凭证密钥 */
52 | "secret": "j-F4DeIhMtbbB3twqxwU",
53 | /* 应用id */
54 | "agentid": "1000006"
55 | },
56 | "Ding": {
57 | /* 是否钉钉推送 */
58 | "push": "False",
59 | /* 应用凭证 */
60 | "appkey": "dingoqw",
61 | /* 应用凭证 */
62 | "appsecret": "UptFE0xc4nsCpDRa",
63 | /* 钉钉app-部门群-设置-机器人-webhook */
64 | "webhook": "https://oapi.dingtalk.com/robot/send?access_token="
65 | },
66 | "pushplus": {
67 | /* 是否pushplus推送 */
68 | "push": "False",
69 | /* pushplus token */
70 | "token": "f6d3d"
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 腾讯视频自动签到领取v力值
2 |
3 |
4 |
5 |
6 |
7 |
8 | 通过腾讯视频官方接口,每天自动签到并领取v力值,并将结果push到手机,助您快速升级。
9 |
10 | 一个账号平均耗时为半分钟左右。放在服务器运行不需要人工干预,支持无服务器的云函数部署,每天自动push相关信息。
11 |
12 | 
13 |
14 |
15 | ------
16 | 目前已实现功能:
17 |
18 |
19 | - [x] 每天自动执行
20 | - [x] 推送到微信,钉钉
21 |
22 | 如有其他好的建议请提交issues
23 |
24 | ## 环境要求
25 | python 3.6
26 |
27 | ## 华为函数工作流 部署
28 | ### 操作方法
29 |
30 | 1.事件函数
31 |
32 | 2.运行时:python3.6
33 |
34 | 3.压缩包tencent_video.zip下载,上传华为云
35 |
36 | 
37 |
38 |
39 | 4.设置-
40 | 函数执行入口:index.main_handler
41 |
42 | 5.触发器-创建触发器-定时触发器-cron表达式:0 30 23 * * ? 每天23点30执行,可以自行修改
43 |
44 | ### 设置项
45 |
46 | push:0为关闭推送,1为企业微信推送
47 |
48 | corpid:企业ID
49 |
50 | secret:应用的凭证密钥
51 |
52 | agentid:应用id
53 |
54 | cookie:腾讯pc登录时的cookie
55 |
56 | ## 青龙面板 部署
57 | ### 操作方法
58 | 
59 |
60 | 三个文件,index.py、push.py、config.json都要在,如果是订阅,请在文件后缀那里填py json
61 |
62 | config是配置文件,支持多账号和三个推送,执行文件为index.py
63 |
64 |
65 |
66 | ### 抓取腾讯视频cookie
67 | 
68 |
69 | 工具HttpCanary,腾讯视频
70 |
71 | 1打开腾讯视频,打开抓包软件,有root就用HttpCanary,没root用电脑fiddler开热点给手机抓包,具体可以百度
72 |
73 | 2。手机腾讯视频签到,成功后找https://vip.video.qq.com/rpc/trpc.new_task_system.task_system.TaskSystem/CheckIn?rpc_data=%7B%7D
74 | 的包,cookie只要这几个vdevice_qimei36、
75 | vqq_appid、
76 | vqq_openid、
77 | vqq_access_token、
78 | main_login。这些都是固定的,出现图形验证就去腾讯视频手动签一次到就行了
79 | 
80 |
81 | # donate
82 |
83 | 如果该项目对您有帮助,欢迎捐赠
84 |
85 |
86 |
87 | | 支付宝 |
88 | 微信 |
89 | QQ群 |
90 |
91 |
92 |
93 |  |
94 |  |
95 |  |
96 |
97 |
98 |
--------------------------------------------------------------------------------
/push.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python3.10
2 | # -*- coding: utf-8 -*-
3 | # Copyright (C) 2023 , Inc. All Rights Reserved
4 | # @Time : 2023/4/19 7:45
5 | # @Author : raindrop
6 | # @Email : 1580925557@qq.com
7 | # @File : push.py
8 |
9 | import requests, json,os,re
10 |
11 | def config():
12 | path = os.getcwd()
13 | if path == '/opt/function':
14 | path = 'code/'
15 | else:
16 | path = ''
17 | with open(path + 'config.json', encoding='utf-8') as f:
18 | account = f.read()
19 | a=account.count('/*')
20 | print(a)
21 | for i in range(a):
22 | x=account.find('/*')
23 | y=account.find('*/')+2
24 | account=account[:x]+account[y:]
25 | account=re.sub(' ', '', account)
26 | account = re.sub('\n', '', account)
27 | print(account)
28 | account=json.loads(account)
29 | return account
30 |
31 |
32 |
33 | def WeCom(content):
34 | wx = config()["push"]["WeCom"]
35 | if not eval(wx["push"]):
36 | print('企业微信不推送')
37 | else:
38 | url = 'https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=' + wx['corpid'] + '&corpsecret=' + wx['secret']
39 | access_token = requests.get(url)
40 | access_token = json.loads(access_token.text)
41 | access_token = access_token.get("access_token")
42 | token = 'c8avSOlP-d5wLBuws4LmmsIjgmnCrUfPA16ftSCAJM4'
43 | url = 'https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=' + access_token
44 | data = json.dumps({
45 | "touser": "@all",
46 | "msgtype": "text",
47 | "agentid": wx['agentid'],
48 | "text": {
49 | "content": content
50 | },
51 | "safe": 0,
52 | "enable_id_trans": 0,
53 | "enable_duplicate_check": 0,
54 | "duplicate_check_interval": 1800
55 | })
56 | resp = requests.post(url, data=data, headers={'Content-Type': 'application/json'})
57 | return (json.loads(resp.text).get('errmsg'))
58 |
59 |
60 | def Ding(content):
61 | ding = config()["push"]["Ding"]
62 | if not eval(ding["push"]):
63 | print('钉钉不推送')
64 | else:
65 | appkey = config()['push']['Ding']['appkey']
66 | appsecret = config()['push']['Ding']['appsecret']
67 | access_token = requests.get('https://oapi.dingtalk.com/gettoken?appkey=' + appkey + '&appsecret=' + appsecret)
68 | access_token = access_token.text
69 | access_token = json.loads(access_token)
70 | access_token = access_token["access_token"]
71 | url = 'https://oapi.dingtalk.com/robot/send?access_token=78c8b773c0796732273b1a65a6360fa20982dafccf13a7950ec88a0b54d18201'
72 | headers = {
73 | 'x-acs-dingtalk-access-token': access_token,
74 | 'Content-Type': 'application/json'
75 | }
76 | data = {
77 | 'text': {'content': content},
78 | 'msgtype': 'text',
79 | 'msgKey': 'sampleText'
80 | }
81 | res = requests.post(url=url, headers=headers, json=data)
82 | return (json.loads(res.text).get('errmsg'))
83 |
84 | def pushplus(content):
85 | pushplus= config()["push"]["pushplus"]
86 | if not eval(pushplus["push"]):
87 | print('pushplus不推送')
88 | url = "http://www.pushplus.plus/send"
89 | headers = {
90 | "Content-Type": "application/json"
91 | }
92 | data = {
93 | "token": pushplus["token"],
94 | "title": '腾讯视频签到',
95 | "content": content
96 | }
97 | try:
98 | requests.post(url, headers=headers, data=json.dumps(data))
99 | except:
100 | print('推送失败')
101 |
102 | def main(content):
103 | print(content)
104 | WeCom(content)
105 | Ding(content)
106 | pushplus(content)
107 |
108 |
109 |
--------------------------------------------------------------------------------
/index.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python3.10
2 | # -*- coding: utf-8 -*-
3 | # Copyright (C) 2023 , Inc. All Rights Reserved
4 | # @Time : 2023/4/18 0:51
5 | # @Author : raindrop
6 | # @Email : 1580925557@qq.com
7 | # @File : index.py
8 |
9 | import requests
10 | import json
11 | import time
12 | import re
13 | import push
14 | import os
15 | '''
16 | 可直接部署在华为云函数流
17 | 函数执行入口填:index.main_handler
18 | 触发器用cron表达式:0 30 23 * * ?
19 | 每天23:30执行
20 | 设置项
21 | '''
22 | '''腾讯视频签到'''
23 |
24 |
25 |
26 |
27 | def ten_video(tag,qimei36,appid,openid,access_token,vuserid,login,ip):
28 | #cookie='vdevice_qimei36='+qimei36+';vqq_appid='+appid+';vqq_openid='+openid+';vqq_access_token='+access_token+';main_login='+login
29 | cookie = 'vdevice_qimei36='+qimei36+';vqq_appid=' + appid + ';vqq_openid=' + openid + ';vqq_access_token=' + access_token + ';main_login=' + login + ';vqq_vuserid=' + vuserid + ';ip=' + ip
30 | log=''
31 | time_1 = int(time.time())
32 | time_2 = time.localtime(time_1)
33 | now = time.strftime("%Y-%m-%d %H:%M:%S", time_2)
34 | log = "腾讯视频会员签到执行任务\n--------------raindrop--------------\n" + now + '\ntag:' + tag
35 | #积分查询
36 | url_3 = 'https://vip.video.qq.com/fcgi-bin/comm_cgi?name=spp_vscore_user_mashup&cmd=&otype=xjson&type=1'
37 | headers_3 = {
38 | 'user-agent': 'Mozilla/5.0 (Linux; Android 11; M2104K10AC Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/89.0.4389.72 MQQBrowser/6.2 TBS/046237 Mobile Safari/537.36 QQLiveBrowser/8.7.85.27058',
39 | 'Content-Type': 'application/json',
40 | 'cookie': cookie
41 | }
42 | response_3 = requests.get(url_3, headers=headers_3)
43 | try:
44 | res_3 = json.loads(response_3.text)
45 | log = log + "\n会员等级:" + str(res_3['lscore_info']['level']) + "\n积分:" + str(
46 | res_3['cscore_info']['vip_score_total']) + "\nV力值:" + str(res_3['lscore_info']['score'])
47 | except:
48 | try:
49 | res_3 = json.loads(response_3.text)
50 | log = log + "\n腾讯视频领获取积分异常,返回内容:\n" + str(res_3)
51 | print(res_3)
52 | except:
53 | log = log + "\n腾讯视频获取积分异常,无法返回内容"
54 | url_3 = 'https://vip.video.qq.com/rpc/trpc.query_vipinfo.vipinfo.QueryVipInfo/GetVipUserInfoH5'
55 | headers_3 = {
56 | 'user-agent': 'Mozilla/5.0 (Linux; Android 11; M2104K10AC Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/89.0.4389.72 MQQBrowser/6.2 TBS/046237 Mobile Safari/537.36 QQLiveBrowser/8.7.85.27058',
57 | 'Content-Type': 'text/plain;charset=UTF-8',
58 | 'cookie': cookie
59 | }
60 | data = '{"geticon":1,"viptype":"svip|nfl","platform":8}'
61 | response_3 = requests.post(url_3, data=data, headers=headers_3)
62 | try:
63 | res_3 = json.loads(response_3.text)
64 | log = log + "\n开始时间:" + str(res_3['beginTime']) + "\n到期时间:" + str(
65 | res_3['endTime'])
66 | if res_3['endmsg'] != '':
67 | log = log + '\nendmsg:' + res_3['endmsg']
68 | print(log)
69 | except:
70 | try:
71 | res_3 = json.loads(response_3.text)
72 | log = log + "\n腾讯视频领获取积分异常,返回内容:\n" + str(res_3)
73 | print(res_3)
74 | except:
75 | log = log + "\n腾讯视频获取积分异常,无法返回内容"
76 | # 签到
77 | url_1 = 'https://vip.video.qq.com/rpc/trpc.new_task_system.task_system.TaskSystem/CheckIn?rpc_data=%7B%7D'
78 | headers_1 = {
79 | 'user-agent': 'Mozilla/5.0 (Linux; Android 11; M2104K10AC Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/89.0.4389.72 MQQBrowser/6.2 TBS/046237 Mobile Safari/537.36 QQLiveBrowser/8.7.85.27058',
80 | 'Content-Type': 'application/json',
81 | 'referer': 'https://film.video.qq.com/x/vip-center/?entry=common&hidetitlebar=1&aid=V0%24%241%3A0%242%3A8%243%3A8.7.85.27058%244%3A3%245%3A%246%3A%247%3A%248%3A4%249%3A%2410%3A&isDarkMode=0',
82 | 'cookie': cookie
83 | }
84 | response_1 = requests.get(url_1, headers=headers_1)
85 | try:
86 | res_1 = json.loads(response_1.text)
87 | log = log + "\n签到获得v力值:" + str(res_1['check_in_score'])
88 | print(res_1)
89 | except:
90 | try:
91 | res_1 = json.loads(response_1.text)
92 | log = log + "\n腾讯视频签到异常,返回内容:\n" + str(res_1)
93 | print(res_1)
94 | except:
95 | log = log + "\n腾讯视频签到异常,无法返回内容"
96 | # 观看
97 | url_2 = 'https://vip.video.qq.com/rpc/trpc.new_task_system.task_system.TaskSystem/ProvideAward?rpc_data=%7B%22task_id%22:1%7D'
98 | headers_2 = {
99 | 'user-agent': 'Mozilla/5.0 (Linux; Android 11; M2104K10AC Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/89.0.4389.72 MQQBrowser/6.2 TBS/046237 Mobile Safari/537.36 QQLiveBrowser/8.7.85.27058',
100 | 'Content-Type': 'application/json',
101 | 'referer': 'https://film.video.qq.com/x/vip-center/?entry=common&hidetitlebar=1&aid=V0%24%241%3A0%242%3A8%243%3A8.7.85.27058%244%3A3%245%3A%246%3A%247%3A%248%3A4%249%3A%2410%3A&isDarkMode=0',
102 | 'cookie': cookie
103 | }
104 | response_2 = requests.get(url_2, headers=headers_2)
105 | try:
106 | res_2 = json.loads(response_2.text)
107 | log = log + "\n观看获得v力值:" + str(res_2['provide_value'])
108 | print(res_2)
109 | except:
110 | try:
111 | res_2 = json.loads(response_2.text)
112 | log = log + "\n腾讯视频领取观看v力值异常,返回内容:\n" + str(res_2)
113 | print(res_2)
114 | except:
115 | log = log + "\n腾讯视频领取观看v力值异常,无法返回内容"
116 |
117 | #任务状态
118 | url='https://vip.video.qq.com/rpc/trpc.new_task_system.task_system.TaskSystem/ReadTaskList?rpc_data=%7B%22business_id%22:%221%22,%22platform%22:3%7D'
119 | headers={'user-agent':'Mozilla/5.0 (Linux; Android 11; M2104K10AC Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/89.0.4389.72 MQQBrowser/6.2 TBS/046237 Mobile Safari/537.36 QQLiveBrowser/8.7.85.27058',
120 | 'Content-Type':'application/json',
121 | 'referer':'https://film.video.qq.com/x/vip-center/?entry=common&hidetitlebar=1&aid=V0%24%241%3A0%242%3A8%243%3A8.7.85.27058%244%3A3%245%3A%246%3A%247%3A%248%3A4%249%3A%2410%3A&isDarkMode=0',
122 | 'cookie':cookie
123 | }
124 | response = requests.get(url,headers=headers)
125 | try:
126 | res = json.loads(response.text)
127 | lis=res["task_list"]
128 | log = log + '\n---------v力值任务状态----------'
129 | for i in lis:
130 | if i["task_button_desc"]=='已完成':
131 | log=log+'\n标题:'+i["task_maintitle"]+'\n状态:'+i["task_subtitle"]
132 | except:
133 | log = log + "获取状态异常,可能是cookie失效"
134 | print(push.main(log))
135 |
136 | def config():
137 | path = os.getcwd()
138 | if path == '/opt/function':
139 | path = 'code/'
140 | else:
141 | path = ''
142 | with open(path + 'config.json', encoding='utf-8') as f:
143 | account = f.read()
144 | a=account.count('/*')
145 | for i in range(a):
146 | x=account.find('/*')
147 | y=account.find('*/')+2
148 | account=account[:x]+account[y:]
149 | account=json.loads(account)
150 | return account
151 |
152 | def main():
153 | configs = config()
154 | a=configs["users"]
155 | for user in a:
156 | if eval(user['enable']):
157 | if 'ip' in user:
158 | ipp=user['ip']
159 | else:
160 | ipp='39.144.36.110'
161 | print(ipp)
162 | ten_video(user['tag'],user['vdevice_qimei36'],user['vqq_appid'],user['vqq_openid'],user['vqq_access_token'],user['vqq_vuserid'],user['main_login'],ipp)
163 |
164 | def main_handler(event, context):
165 | return main()
166 |
167 |
168 | if __name__ == '__main__':
169 | main()
170 |
--------------------------------------------------------------------------------