feat: 新增匹配av号、bv号以及分p的支持

This commit is contained in:
MiaoYan JY
2023-10-03 14:04:15 +08:00
parent a16939bd1f
commit fef81d8906

View File

@@ -300,7 +300,7 @@ namespace MaaWpfGui.ViewModels.UI
AddLog(details, detailsColor);
{
Url = CopilotUiUrl;
var linkParser = new Regex(@"AV\d+|(BV.*?).{10}", RegexOptions.Compiled | RegexOptions.IgnoreCase);
var linkParser = new Regex(@"AV\d+/\?p=\d+|AV\d+|BV[a-zA-Z0-9]{10}/\?p=\d+|BV[a-zA-Z0-9]{10}", RegexOptions.Compiled | RegexOptions.IgnoreCase);
foreach (Match match in linkParser.Matches(details))
{
Url = MaaUrls.BilibiliVideo + match.Value;