diff --git a/BBDown/BBDown.csproj b/BBDown/BBDown.csproj index 950f6464e..a7e99a8a7 100644 --- a/BBDown/BBDown.csproj +++ b/BBDown/BBDown.csproj @@ -3,7 +3,7 @@ Exe net6.0 - 1.4.5 + 1.4.6 BBDown是一个免费且便捷高效的哔哩哔哩下载/解析软件. https://github.com/nilaoda/BBDown diff --git a/BBDown/BBDownUtil.cs b/BBDown/BBDownUtil.cs index 0b1054600..768bd1941 100644 --- a/BBDown/BBDownUtil.cs +++ b/BBDown/BBDownUtil.cs @@ -237,7 +237,7 @@ public static async Task FixAvidAsync(string avid) json = await GetWebSourceAsync(api); using var infoJson = JsonDocument.Parse(json); var data = infoJson.RootElement.GetProperty("data"); - if (data.GetProperty("redirect_url").ToString().Contains("bangumi")) + if (data.TryGetProperty("redirect_url", out _) && data.GetProperty("redirect_url").ToString().Contains("bangumi")) { var epId = Regex.Match(data.GetProperty("redirect_url").ToString(), "ep(\\d+)").Groups[1].Value; return $"ep:{epId}";