mirror of
https://github.com/Sitoi/dailycheckin.git
synced 2024-11-17 13:48:03 +08:00
添加腾讯视频每日签到 & 吾爱破解每日签到 & 有道云笔记每日签到
This commit is contained in:
parent
a0f08ce9bc
commit
805822ac27
@ -1,13 +1,14 @@
|
||||
# 每日签到集合
|
||||
|
||||
基于腾讯云函数的每日签到脚本
|
||||
基于腾讯云函数的每日签到脚本(支持多账号使用)
|
||||
|
||||
## 一、功能
|
||||
|
||||
- [x] 爱奇艺每日签到: 签7天奖1天,14天奖2天,28天奖7天;日常任务;随机成长值
|
||||
- [x] 全民K歌每日签到: 每日签到获取鲜花
|
||||
- [x] 百度站点每日提交: 每日提交网站页面供百度收录
|
||||
- [x] 腾讯视频每日签到: 每日两次腾讯视频签到获取成长值
|
||||
- [x] 吾爱破解每日签到: 每日签到获取 2枚破解币
|
||||
- [x] 吾爱破解每日签到: 每日签到获取 2枚吾爱币
|
||||
- [x] 有道云笔记每日签到: 每日签到获取存储空间
|
||||
|
||||
## 二、使用
|
||||
|
@ -1 +1,2 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from baidu_url_submit.baidu_url_submit import BaiduUrlSubmit
|
||||
|
89
index.py
89
index.py
@ -1,11 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import json
|
||||
|
||||
from baidu_url_submit.baidu_url_submit import BaiduUrlSubmit
|
||||
from iqiyi.iqiyi import IQIYICheckIn
|
||||
from pojie.pojie import PojieCheckIn
|
||||
from vqq.vqq import VQQCheckIn
|
||||
from youdao.youdao import YouDaoCheckIn
|
||||
from baidu_url_submit import BaiduUrlSubmit
|
||||
from iqiyi import IQIYICheckIn
|
||||
from kgqq import KGQQCheckIn
|
||||
from pojie import PojieCheckIn
|
||||
from vqq import VQQCheckIn
|
||||
from youdao import YouDaoCheckIn
|
||||
|
||||
|
||||
def main_handler(event, context):
|
||||
@ -13,44 +14,50 @@ def main_handler(event, context):
|
||||
data = json.loads(f.read())
|
||||
dingtalk_secret = data.get("dingtalk", {}).get("dingtalk_secret")
|
||||
dingtalk_access_token = data.get("dingtalk", {}).get("dingtalk_access_token")
|
||||
|
||||
iqiyi_cookie_list = data.get("iqiyi", [])
|
||||
if iqiyi_cookie_list:
|
||||
IQIYICheckIn(
|
||||
# iqiyi_cookie_list = data.get("iqiyi", [])
|
||||
# if iqiyi_cookie_list:
|
||||
# IQIYICheckIn(
|
||||
# dingtalk_secret=dingtalk_secret,
|
||||
# dingtalk_access_token=dingtalk_access_token,
|
||||
# iqiyi_cookie_list=iqiyi_cookie_list,
|
||||
# ).main()
|
||||
#
|
||||
# baidu_url_submit_list = data.get("BaiduUrlSubmit", [])
|
||||
# if baidu_url_submit_list:
|
||||
# BaiduUrlSubmit(
|
||||
# dingtalk_secret=dingtalk_secret,
|
||||
# dingtalk_access_token=dingtalk_access_token,
|
||||
# baidu_url_submit_list=baidu_url_submit_list,
|
||||
# ).main()
|
||||
#
|
||||
# vqq_cookie_list = data.get("vqq", [])
|
||||
# if vqq_cookie_list:
|
||||
# VQQCheckIn(
|
||||
# dingtalk_secret=dingtalk_secret,
|
||||
# dingtalk_access_token=dingtalk_access_token,
|
||||
# vqq_cookie_list=vqq_cookie_list,
|
||||
# ).main()
|
||||
#
|
||||
# youdao_cookie_list = data.get("youdao", [])
|
||||
# if youdao_cookie_list:
|
||||
# YouDaoCheckIn(
|
||||
# dingtalk_secret=dingtalk_secret,
|
||||
# dingtalk_access_token=dingtalk_access_token,
|
||||
# youdao_cookie_list=youdao_cookie_list,
|
||||
# ).main()
|
||||
# pojie_cookie_list = data.get("52pojie", [])
|
||||
# if pojie_cookie_list:
|
||||
# PojieCheckIn(
|
||||
# dingtalk_secret=dingtalk_secret,
|
||||
# dingtalk_access_token=dingtalk_access_token,
|
||||
# pojie_cookie_list=pojie_cookie_list,
|
||||
# ).main()
|
||||
kgqq_cookie_list = data.get("kgqq", [])
|
||||
if kgqq_cookie_list:
|
||||
KGQQCheckIn(
|
||||
dingtalk_secret=dingtalk_secret,
|
||||
dingtalk_access_token=dingtalk_access_token,
|
||||
iqiyi_cookie_list=iqiyi_cookie_list,
|
||||
).main()
|
||||
|
||||
baidu_url_submit_list = data.get("BaiduUrlSubmit", [])
|
||||
if baidu_url_submit_list:
|
||||
BaiduUrlSubmit(
|
||||
dingtalk_secret=dingtalk_secret,
|
||||
dingtalk_access_token=dingtalk_access_token,
|
||||
baidu_url_submit_list=baidu_url_submit_list,
|
||||
).main()
|
||||
|
||||
vqq_cookie_list = data.get("vqq", [])
|
||||
if vqq_cookie_list:
|
||||
VQQCheckIn(
|
||||
dingtalk_secret=dingtalk_secret,
|
||||
dingtalk_access_token=dingtalk_access_token,
|
||||
vqq_cookie_list=vqq_cookie_list,
|
||||
).main()
|
||||
|
||||
youdao_cookie_list = data.get("youdao", [])
|
||||
if youdao_cookie_list:
|
||||
YouDaoCheckIn(
|
||||
dingtalk_secret=dingtalk_secret,
|
||||
dingtalk_access_token=dingtalk_access_token,
|
||||
youdao_cookie_list=youdao_cookie_list,
|
||||
).main()
|
||||
pojie_cookie_list = data.get("52pojie", [])
|
||||
if pojie_cookie_list:
|
||||
PojieCheckIn(
|
||||
dingtalk_secret=dingtalk_secret,
|
||||
dingtalk_access_token=dingtalk_access_token,
|
||||
pojie_cookie_list=pojie_cookie_list,
|
||||
kgqq_cookie_list=kgqq_cookie_list,
|
||||
).main()
|
||||
return
|
||||
|
||||
|
@ -1 +1,2 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from iqiyi.iqiyi import IQIYICheckIn
|
||||
|
@ -12,11 +12,6 @@ import requests
|
||||
|
||||
|
||||
class IQIYICheckIn:
|
||||
"""
|
||||
爱奇艺签到、抽奖、做日常任务(签到、任务仅限 VIP)
|
||||
*奖励:签 7天奖 1天,14天奖 2天,28天奖 7天;日常任务;随机成长值
|
||||
"""
|
||||
|
||||
def __init__(self, dingtalk_secret, dingtalk_access_token, iqiyi_cookie_list):
|
||||
self.dingtalk_secret = dingtalk_secret
|
||||
self.dingtalk_access_token = dingtalk_access_token
|
||||
@ -24,7 +19,8 @@ class IQIYICheckIn:
|
||||
self.task_list = []
|
||||
self.growth_task = 0
|
||||
|
||||
def parse_cookie(self, cookie):
|
||||
@staticmethod
|
||||
def parse_cookie(cookie):
|
||||
p00001 = re.findall(r"P00001=(.*?);", cookie)[0]
|
||||
p00003 = re.findall(r"P00003=(.*?);", cookie)[0]
|
||||
return p00001, p00003
|
||||
@ -119,12 +115,10 @@ class IQIYICheckIn:
|
||||
"""
|
||||
url = "https://tc.vip.iqiyi.com/taskCenter/task/joinTask"
|
||||
params = {"P00001": p00001, "taskCode": "", "platform": "bb136ff4276771f3", "lang": "zh_CN"}
|
||||
# 遍历任务,仅做一次
|
||||
for item in self.task_list:
|
||||
if item["status"] == 2:
|
||||
params["taskCode"] = item["taskCode"]
|
||||
res = requests.get(url=url, params=params)
|
||||
# print(res.text)
|
||||
requests.get(url=url, params=params)
|
||||
|
||||
def get_task_rewards(self, p00001):
|
||||
"""
|
||||
@ -146,6 +140,8 @@ class IQIYICheckIn:
|
||||
"""
|
||||
查询抽奖次数(必),抽奖
|
||||
:param draw_type: 类型。0 查询次数;1 抽奖
|
||||
:param p00001: 关键参数
|
||||
:param p00003: 关键参数
|
||||
:return: {status, msg, chance}
|
||||
"""
|
||||
url = "https://iface2.iqiyi.com/aggregate/3.0/lottery_activity"
|
||||
@ -182,10 +178,7 @@ class IQIYICheckIn:
|
||||
def main(self):
|
||||
for iqiyi_cookie in self.iqiyi_cookie_list:
|
||||
p00001, p00003 = self.parse_cookie(iqiyi_cookie.get("iqiyi_cookie"))
|
||||
# 签到
|
||||
sign_msg = self.sign(p00001=p00001)
|
||||
|
||||
# 抽奖
|
||||
chance = self.draw(0, p00001=p00001, p00003=p00003)["chance"]
|
||||
if chance:
|
||||
draw_msg = ""
|
||||
@ -194,12 +187,8 @@ class IQIYICheckIn:
|
||||
draw_msg += ret["msg"] + ";" if ret["status"] else ""
|
||||
else:
|
||||
draw_msg = "抽奖机会不足"
|
||||
|
||||
# 日常任务
|
||||
self.query_user_task(p00001=p00001).join_task(p00001=p00001)
|
||||
task_msg = self.query_user_task(p00001=p00001).get_task_rewards(p00001=p00001)
|
||||
|
||||
# 查询用户信息
|
||||
user_msg = self.user_information(p00001=p00001)
|
||||
msg = (
|
||||
f"【爱奇艺等级】\n{user_msg}\n-----------------------------\n"
|
||||
|
@ -1 +1,2 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from kgqq.kgqq import KGQQCheckIn
|
||||
|
@ -106,7 +106,7 @@ class KGQQCheckIn:
|
||||
new_num = new_proto_profile_response.json()["data"]["profile.getProfile"]["uFlowerNum"]
|
||||
get_num = int(new_num) - int(old_num)
|
||||
if get_num == 0:
|
||||
kg_message = "√"
|
||||
kg_message = "今日鲜花已领取"
|
||||
else:
|
||||
kg_message = "+{0}朵".format(get_num)
|
||||
except Exception as e:
|
||||
|
@ -1 +1,2 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from pojie.pojie import PojieCheckIn
|
||||
|
@ -11,11 +11,6 @@ import requests
|
||||
|
||||
|
||||
class PojieCheckIn:
|
||||
"""
|
||||
吾爱破解论坛签到
|
||||
*签到得2个爱币
|
||||
"""
|
||||
|
||||
def __init__(self, dingtalk_secret, dingtalk_access_token, pojie_cookie_list):
|
||||
self.dingtalk_secret = dingtalk_secret
|
||||
self.dingtalk_access_token = dingtalk_access_token
|
||||
@ -39,9 +34,6 @@ class PojieCheckIn:
|
||||
return content
|
||||
|
||||
def sign(self, headers):
|
||||
"""
|
||||
签到
|
||||
"""
|
||||
url = "https://www.52pojie.cn/home.php?mod=task&do=apply&id=2"
|
||||
res = requests.get(url=url, headers=headers)
|
||||
if "任务已完成" in res.content.decode("gbk"):
|
||||
|
@ -1 +1,2 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from vqq.vqq import VQQCheckIn
|
||||
|
11
vqq/vqq.py
11
vqq/vqq.py
@ -12,12 +12,7 @@ import requests
|
||||
|
||||
|
||||
class VQQCheckIn:
|
||||
"""
|
||||
腾讯视频签到
|
||||
"""
|
||||
|
||||
def __init__(self, dingtalk_secret, dingtalk_access_token, vqq_cookie_list):
|
||||
|
||||
self.dingtalk_secret = dingtalk_secret
|
||||
self.dingtalk_access_token = dingtalk_access_token
|
||||
self.vqq_cookie_list = vqq_cookie_list
|
||||
@ -40,9 +35,6 @@ class VQQCheckIn:
|
||||
return content
|
||||
|
||||
def sign_once(self, session, headers):
|
||||
"""
|
||||
一次签到
|
||||
"""
|
||||
url = "http://v.qq.com/x/bu/mobile_checkin?isDarkMode=0&uiType=REGULAR"
|
||||
res = session.get(url=url, headers=headers)
|
||||
match = re.search(r'isMultiple" />\s+(.*?)\s+<', res.text)
|
||||
@ -54,9 +46,6 @@ class VQQCheckIn:
|
||||
return msg
|
||||
|
||||
def sign_twice(self, session, headers):
|
||||
"""
|
||||
二次签到
|
||||
"""
|
||||
this_time = int(round(time.time() * 1000))
|
||||
url = "https://vip.video.qq.com/fcgi-bin/comm_cgi?name=hierarchical_task_system&cmd=2&_=" + str(this_time)
|
||||
res = session.get(url=url, headers=headers)
|
||||
|
@ -1 +1,2 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from youdao.youdao import YouDaoCheckIn
|
||||
|
@ -11,7 +11,6 @@ import requests
|
||||
|
||||
|
||||
class YouDaoCheckIn:
|
||||
|
||||
def __init__(self, dingtalk_secret, dingtalk_access_token, youdao_cookie_list):
|
||||
self.dingtalk_secret = dingtalk_secret
|
||||
self.dingtalk_access_token = dingtalk_access_token
|
||||
|
Loading…
Reference in New Issue
Block a user