Skip to content

Commit

Permalink
feat: 添加视频浏览任务 (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
Night-stars-1 authored Apr 24, 2024
1 parent 019cd28 commit d6ec232
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
20 changes: 20 additions & 0 deletions utils/api/sign.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,25 @@ class BrowseSpecialPage(BaseSign):
URL_SIGN = 'https://api-alpha.vip.miui.com/mtop/planet/vip/member/addCommunityGrowUpPointByActionV2'


class BrowseVideoPost(BaseSign):
"""
浏览指定视频流超过5分钟
"""
NAME = "浏览指定视频流超过5分钟"

PARAMS = {
'ref': 'vipAccountShortcut',
'pathname': '/mio/detail',
'version': 'dev.231026',
'miui_vip_a_ph': "{miui_vip_a_ph}"
}
DATA = {
'action': 'BROWSE_VIDEO_POST',
'miui_vip_a_ph': "{miui_vip_a_ph}"
}
URL_SIGN = 'https://api-alpha.vip.miui.com/mtop/planet/vip/member/addCommunityGrowUpPointByActionV2'


class BoardFollow(BaseSign):
"""
加入小米圈子
Expand Down Expand Up @@ -329,6 +348,7 @@ class CarrotPull(BaseSign):
# 注册签到任务
BaseSign.AVAILABLE_SIGNS[CheckIn.NAME] = CheckIn
BaseSign.AVAILABLE_SIGNS[BrowsePost.NAME] = BrowsePost
BaseSign.AVAILABLE_SIGNS[BrowseVideoPost.NAME] = BrowseVideoPost
BaseSign.AVAILABLE_SIGNS[BrowseUserPage.NAME] = BrowseUserPage
BaseSign.AVAILABLE_SIGNS[BrowseSpecialPage.NAME] = BrowseSpecialPage
BaseSign.AVAILABLE_SIGNS[BoardFollow.NAME] = BoardFollow
Expand Down
2 changes: 2 additions & 0 deletions utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ class Account(BaseModel):
"""社区浏览个人主页10秒,启用功能意味着你愿意自行承担相关风险"""
BrowsePost: bool = False
"""社区浏览帖子10秒,启用功能意味着你愿意自行承担相关风险"""
BrowseVideoPost: bool = False
"""社区浏览视频帖子5分钟,启用功能意味着你愿意自行承担相关风险"""
ThumbUp: bool = False
"""点赞帖子,启用功能意味着你愿意自行承担相关风险"""
BrowseSpecialPage: bool = False
Expand Down

1 comment on commit d6ec232

@pureair
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好评

Please sign in to comment.