fix: fix iqiyi api

This commit is contained in:
cxfksword
2023-11-29 15:01:38 +08:00
parent bd32414ac2
commit b0e670ed58
2 changed files with 4 additions and 4 deletions

View File

@@ -30,7 +30,7 @@ namespace Jellyfin.Plugin.Danmu.Test
{
try
{
var keyword = "回魂夜";
var keyword = "青春环游记";
var result = await api.SearchAsync(keyword, CancellationToken.None);
Console.WriteLine(result);
}
@@ -51,9 +51,9 @@ namespace Jellyfin.Plugin.Danmu.Test
{
try
{
// var id = "j5998jke4w"; // 综艺
var id = "25f5iplvm8s"; // 综艺
// var id = "xkt6z3z798"; // 电视剧
var id = "1e54n0pt5ro"; // 电影
// var id = "1e54n0pt5ro"; // 电影
var result = await api.GetVideoAsync(id, CancellationToken.None);
Console.WriteLine(result);
}

View File

@@ -25,7 +25,7 @@ namespace Jellyfin.Plugin.Danmu.Scrapers.Iqiyi;
public class IqiyiApi : AbstractApi
{
private new const string HTTP_USER_AGENT = "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/93.0.4577.63";
private new const string HTTP_USER_AGENT = "Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.91 Mobile Safari/537.36 Edg/115.0.0.0";
private static readonly Regex regVideoInfo = new Regex(@"""videoInfo"":(\{.+?\}),", RegexOptions.Compiled);
private static readonly Regex regAlbumInfo = new Regex(@"""albumInfo"":(\{.+?\}),", RegexOptions.Compiled);