├── 20200403211301457.png ├── 20200403211617661.png ├── README.md └── 做任务.py /20200403211301457.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OkayYang/TX_video_sign/07ab07d2264b6be8f890f0c751e6b294af5f9f29/20200403211301457.png -------------------------------------------------------------------------------- /20200403211617661.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OkayYang/TX_video_sign/07ab07d2264b6be8f890f0c751e6b294af5f9f29/20200403211617661.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # -1:需要借助腾讯云的云函数服务每日定点执行- 2 | ![云函数创建](https://s1.ax1x.com/2020/05/23/YxFK2t.png) 3 | # -2:触发时间自己设置(图中时间为每天23点,便于任务过完忘记签到)- 4 | ![定时触发](https://s1.ax1x.com/2020/05/23/YxkZLT.png) 5 | # -3:添加代码- 6 | `````python 7 | import requests 8 | def request(): 9 | #参考这个网站https://sc.ftqq.com/获取自己的sckey,cookie过期提醒 10 | #不需要设置Cookie过期提醒可以把sckey,send_url相关代码删掉 11 | sckey='' 12 | send_url = "https://sc.ftqq.com/%s.send"%(sckey) 13 | Cookie= '' 14 | #cookie在https://film.qq.com/x/autovue/grade/登录账号获取 15 | Referer= 'https://film.qq.com/x/autovue/grade/' 16 | Agent= 'User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1' 17 | headers = { 'Referer': Referer, 'User-Agent': Agent, 'Cookie': Cookie } 18 | login = requests.get('https://vip.video.qq.com/fcgi-bin/comm_cgi?name=spp_MissionFaHuo&cmd=4&task_id=3&_=1582368319252&callback=Zepto1582368297765 ', headers=headers) 19 | #如果请求返回信息包含no login说明cookie已经失效 20 | if login.content.decode("utf-8").__contains__("no login"): 21 | print ("auth_refresh error") 22 | params = {'text': '腾讯视频V力值签到通知', 'desp': '获取Cookie失败,Cookie失效'} 23 | requests.post(send_url, params=params) 24 | urls=[ 25 | 'https://vip.video.qq.com/fcgi-bin/comm_cgi?name=spp_MissionFaHuo&cmd=4&task_id=7&_=1582364733058&callback=Zepto1582364712694',#下载签到请求 26 | 'https://vip.video.qq.com/fcgi-bin/comm_cgi?name=spp_MissionFaHuo&cmd=4&task_id=6&_=1582366326994&callback=Zepto1582366310545',#签到请求 27 | 'https://vip.video.qq.com/fcgi-bin/comm_cgi?name=hierarchical_task_system&cmd=2&_=1555060502385&callback=Zepto1555060502385',#赠送签到请求 28 | 'https://vip.video.qq.com/fcgi-bin/comm_cgi?name=spp_MissionFaHuo&cmd=4&task_id=3&_=1582368319252&callback=Zepto1582368297765',#弹幕签到请求 29 | 'https://vip.video.qq.com/fcgi-bin/comm_cgi?name=spp_MissionFaHuo&cmd=4&task_id=1&_=1582997048625&callback=Zepto1582997031843'#观看60分钟签到 30 | ] 31 | for url in urls: 32 | response = requests.get(url=url, headers=headers) 33 | print(response.content.decode("utf-8")) 34 | return 1 35 | def main(event, context): 36 | request() 37 | ````` 38 | -------------------------------------------------------------------------------- /做任务.py: -------------------------------------------------------------------------------- 1 | import requests 2 | #参考这个网站https://sc.ftqq.com/获取自己的sckey,如果cookie失效会通过server酱提示你 3 | sckey='' 4 | send_url = "https://sc.ftqq.com/%s.send"%(sckey) 5 | Cookie = '' 6 | Referer = 'https://film.qq.com/x/autovue/grade/' 7 | Agent = 'User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1' 8 | headers = { 9 | 'User-Agent': Agent, 10 | 'Cookie':Cookie, 11 | 'Referer': 'https://v.qq.com' 12 | } 13 | #测试一个签到请求 14 | login = requests.get('https://vip.video.qq.com/fcgi-bin/comm_cgi?name=spp_MissionFaHuo&cmd=4&task_id=3&_=1582368319252&callback=Zepto1582368297765 ', headers=headers) 15 | #如果请求返回信息包含no login说明cookie已经失效 16 | if login.content.decode("utf-8").__contains__("no login"): 17 | print ("auth_refresh error") 18 | params = {'text': '腾讯视频V力值签到通知', 'desp': '获取Cookie失败,Cookie失效'} 19 | requests.post(send_url, params=params) 20 | urls = [ 21 | 'https://vip.video.qq.com/fcgi-bin/comm_cgi?name=spp_MissionFaHuo&cmd=4&task_id=7&_=1582364733058&callback=Zepto1582364712694', 22 | # 下载签到请求 23 | 'https://vip.video.qq.com/fcgi-bin/comm_cgi?name=spp_MissionFaHuo&cmd=4&task_id=6&_=1582366326994&callback=Zepto1582366310545', 24 | # 赠送签到请求 25 | 'https://vip.video.qq.com/fcgi-bin/comm_cgi?name=hierarchical_task_system&cmd=2&_=1555060502385&callback=Zepto1555060502385', 26 | # 签到请求 27 | 'https://vip.video.qq.com/fcgi-bin/comm_cgi?name=spp_MissionFaHuo&cmd=4&task_id=3&_=1582368319252&callback=Zepto1582368297765 ', 28 | # 弹幕签到请求 29 | 'https://vip.video.qq.com/fcgi-bin/comm_cgi?name=spp_MissionFaHuo&cmd=4&task_id=1&_=1582997048625&callback=Zepto1582997031843', 30 | # 观看60分钟签到 31 | ] 32 | cout=0 33 | for url in urls: 34 | cout += 1 35 | if (cout == 1): 36 | print("发送下载签到请求") 37 | elif (cout == 2): 38 | print("发送赠送签到请求") 39 | elif (cout == 3): 40 | print("发送签到请求") 41 | elif (cout == 4): 42 | print("发送弹幕签到请求") 43 | elif (cout == 5): 44 | print("发送观看60分钟请求") 45 | response = requests.get(url=url, headers=headers) 46 | print(response.content.decode("utf-8")) 47 | 48 | --------------------------------------------------------------------------------