-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
732 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,3 +46,5 @@ | |
- 【#169】领取大会员福利任务更改为每日都尝试执行 | ||
- 青龙拉库兼容大小写问题 | ||
- 【#197】合并PR,新增了阅读漫画功能到每日任务中(@ChanceLuo) | ||
## 0.2.0 | ||
- 新增大会员大积分任务 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<Authors>Ray</Authors> | ||
<Version>0.1.2</Version> | ||
<Version>0.2.0</Version> | ||
<NoWarn>$(NoWarn);CS1591;CS0436</NoWarn> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
# new Env("bili大会员大积分[dev先行版]") | ||
# cron 7 1 * * * bili_dev_task_vipBigPoint.sh | ||
|
||
dir_shell=$QL_DIR/shell | ||
. $dir_shell/share.sh | ||
|
||
bili_repo="raywangqvq_bilibilitoolpro_develop" | ||
|
||
echo "repo目录: $dir_repo" | ||
bili_repo_dir="$(find $dir_repo -type d -iname $bili_repo | head -1)" | ||
echo -e "bili仓库目录: $bili_repo_dir\n" | ||
|
||
cd $bili_repo_dir | ||
export ENVIRONMENT=Production && \ | ||
export Ray_RunTasks=VipBigPoint && \ | ||
dotnet run --project ./src/Ray.BiliBiliTool.Console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
# new Env("bili大会员大积分") | ||
# cron 7 1 * * * bili_task_vipBigPoint.sh | ||
|
||
dir_shell=$QL_DIR/shell | ||
. $dir_shell/share.sh | ||
|
||
bili_repo="raywangqvq_bilibilitoolpro" | ||
|
||
echo "repo目录: $dir_repo" | ||
bili_repo_dir="$(find $dir_repo -type d -iname $bili_repo | head -1)" | ||
echo -e "bili仓库目录: $bili_repo_dir\n" | ||
|
||
cd $bili_repo_dir | ||
export ENVIRONMENT=Production && \ | ||
export Ray_RunTasks=VipBigPoint && \ | ||
dotnet run --project ./src/Ray.BiliBiliTool.Console |
18 changes: 18 additions & 0 deletions
18
src/Ray.BiliBiliTool.Agent/BiliBiliAgent/Dtos/VipTask/ReceiveOrCompleteTaskRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Ray.BiliBiliTool.Agent.BiliBiliAgent.Dtos.VipTask | ||
{ | ||
public class ReceiveOrCompleteTaskRequest | ||
{ | ||
public ReceiveOrCompleteTaskRequest(string taskCode) | ||
{ | ||
TaskCode=taskCode; | ||
} | ||
|
||
public string TaskCode { get; set; } | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/Ray.BiliBiliTool.Agent/BiliBiliAgent/Dtos/VipTask/SignRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Ray.BiliBiliTool.Agent.BiliBiliAgent.Dtos.VipTask | ||
{ | ||
public class SignRequest | ||
{ | ||
public string Statistics { get; set; }= "{\"appId\":1,\"platform\":3,\"version\":\"6.85.0\",\"abtest\":\"\"}"; | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
src/Ray.BiliBiliTool.Agent/BiliBiliAgent/Dtos/VipTask/ViewRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Ray.BiliBiliTool.Agent.BiliBiliAgent.Dtos.VipTask | ||
{ | ||
public class ViewRequest | ||
{ | ||
public ViewRequest(string position) | ||
{ | ||
this.position=position; | ||
} | ||
|
||
public string position { get; set; } | ||
|
||
public string c_locale { get; set; } = "zh_CN"; | ||
|
||
public string channel { get; set; } = "html5_search_baidu"; | ||
|
||
public int disable_rcmd { get; set; } = 0; | ||
|
||
public string mobi_app { get; set; } = "android"; | ||
|
||
public string platform { get; set; } = "android"; | ||
|
||
public string s_locale { get; set; } = "zh_CN"; | ||
|
||
public string statistics { get; set; } = "{\"appId\":1,\"platform\":3,\"version\":\"6.85.0\",\"abtest\":\"\"}"; | ||
} | ||
} |
97 changes: 97 additions & 0 deletions
97
src/Ray.BiliBiliTool.Agent/BiliBiliAgent/Dtos/VipTask/VipTaskListItem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Microsoft.Extensions.Logging; | ||
|
||
namespace Ray.BiliBiliTool.Agent.BiliBiliAgent.Dtos.VipTask | ||
{ | ||
public class VipTaskInfo | ||
{ | ||
public TaskInfo Task_info { get; set; } | ||
|
||
public void LogInfo(ILogger logger) | ||
{ | ||
logger.LogInformation("------当前任务状态------"); | ||
|
||
logger.LogInformation("打卡:{signed}", Task_info.Sing_task_item.IsTodaySigned ? "√" : "X"); | ||
|
||
foreach (var moduleItem in Task_info.Modules) | ||
{ | ||
logger.LogInformation("-{title}", moduleItem.module_title); | ||
foreach (var commonTaskItem in moduleItem.common_task_item) | ||
{ | ||
logger.LogInformation("---{title}:{status}", | ||
commonTaskItem.title, | ||
commonTaskItem.state == 3 ? "√" : "X"); | ||
} | ||
} | ||
logger.LogInformation("------------------------{newLine}", Environment.NewLine); | ||
|
||
} | ||
} | ||
|
||
public class TaskInfo | ||
{ | ||
public int Score_month { get; set; } | ||
|
||
public int Score_limit { get; set; } | ||
|
||
public List<ModuleItem> Modules { get; set; } | ||
|
||
public SingTaskItem Sing_task_item { get; set; } | ||
} | ||
|
||
public class SingTaskItem | ||
{ | ||
public int Count { get; set; } | ||
|
||
public int Base_score { get; set; } | ||
|
||
public List<Histtory> Histories { get; set; } = new List<Histtory>(); | ||
|
||
public Histtory TodayHistory => Histories.FirstOrDefault(x => x.Is_today); | ||
|
||
public bool IsTodaySigned => TodayHistory?.Signed == true; | ||
} | ||
|
||
public class ModuleItem | ||
{ | ||
public string module_title { get; set; } | ||
|
||
public List<CommonTaskItem> common_task_item { get; set; } | ||
} | ||
|
||
public class CommonTaskItem | ||
{ | ||
public string title { get; set; } | ||
|
||
public string subtitle { get; set; } | ||
|
||
public string explain { get; set; } | ||
|
||
public string task_code { get; set; } | ||
|
||
public int state { get; set; } | ||
|
||
public int vip_limit { get; set; } | ||
|
||
public int complete_times { get; set; } | ||
|
||
public int max_times { get; set; } | ||
|
||
public int recall_num { get; set; } | ||
} | ||
|
||
public class Histtory | ||
{ | ||
public DateTime Day { get; set; } | ||
|
||
public bool Signed { get; set; } | ||
|
||
public int Score { get; set; } | ||
|
||
public bool Is_today { get; set; } | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
src/Ray.BiliBiliTool.Agent/BiliBiliAgent/Interfaces/IVipBigPointApi.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Threading.Tasks; | ||
using Ray.BiliBiliTool.Agent.Attributes; | ||
using Ray.BiliBiliTool.Agent.BiliBiliAgent.Dtos; | ||
using Ray.BiliBiliTool.Agent.BiliBiliAgent.Dtos.VipTask; | ||
using WebApiClientCore.Attributes; | ||
|
||
namespace Ray.BiliBiliTool.Agent.BiliBiliAgent.Interfaces | ||
{ | ||
/// <summary> | ||
/// 大会员大积分 | ||
/// </summary> | ||
[Header("Host", "api.bilibili.com")] | ||
[Header("Referer", "https://big.bilibili.com/mobile/bigPoint/task")] | ||
[Header("User-Agent", "Mozilla/5.0 (Linux; Android 6.0.1; MuMu Build/V417IR; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.158 Mobile Safari/537.36 os/android model/MuMu build/6720300 osVer/6.0.1 sdkInt/23 network/2 BiliApp/6720300 mobi_app/android channel/html5_search_baidu Buvid/XZFC135F5263B6897C8A4BE7AEB125BBF10F8 sessionID/72d3f4c9 innerVer/6720310 c_locale/zh_CN s_locale/zh_CN disable_rcmd/0 6.72.0 os/android model/MuMu mobi_app/android build/6720300 channel/html5_search_baidu innerVer/6720310 osVer/6.0.1 network/2")] | ||
[LogFilter] | ||
public interface IVipBigPointApi | ||
{ | ||
[HttpGet("/x/vip_point/task/combine")] | ||
Task<BiliApiResponse<VipTaskInfo>> GetTaskList(); | ||
|
||
[HttpPost("/pgc/activity/score/task/sign")] | ||
Task<BiliApiResponse> Sign([FormContent] SignRequest request); | ||
|
||
[HttpPost("/pgc/activity/score/task/receive")] | ||
Task<BiliApiResponse> Receive([JsonContent] ReceiveOrCompleteTaskRequest request); | ||
|
||
[HttpPost("/pgc/activity/score/task/complete")] | ||
Task<BiliApiResponse> Complete([JsonContent] ReceiveOrCompleteTaskRequest request); | ||
|
||
[HttpPost("/pgc/activity/deliver/task/complete")] | ||
Task<BiliApiResponse> ViewComplete([FormContent] ViewRequest request); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/Ray.BiliBiliTool.Application.Contracts/IVipBigPointAppService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Text; | ||
|
||
namespace Ray.BiliBiliTool.Application.Contracts | ||
{ | ||
/// <summary> | ||
/// 每日自动任务 | ||
/// </summary> | ||
[Description("VipBigPoint")] | ||
|
||
public interface IVipBigPointAppService : IAppService | ||
{ | ||
} | ||
} |
Oops, something went wrong.