using DownKyi.Core.BiliApi.History.Models; using DownKyi.Core.Logging; using Newtonsoft.Json; using System; using System.Collections.Generic; namespace DownKyi.Core.BiliApi.History { /// /// 稍后再看 /// public static class ToView { /// /// 获取稍后再看视频列表 /// /// public static List GetToView() { string url = "https://api.bilibili.com/x/v2/history/toview"; string referer = "https://www.bilibili.com"; string response = WebClient.RequestWeb(url, referer); try { var toView = JsonConvert.DeserializeObject(response); if (toView == null || toView.Data == null) { return null; } return toView.Data.List; } catch (Exception e) { Utils.Debugging.Console.PrintLine("GetToView()发生异常: {0}", e); LogManager.Error("ToView", e); return null; } } } }