예제 #1
0
    public static async Task GetDetailTask(MoeItem img, SearchPara para, CancellationToken token)
    {
        var url  = img.DetailUrl;
        var net  = new NetOperator(img.Site.Settings, img.Site);
        var html = await net.GetHtmlAsync(url, null, false, token);

        if (html == null)
        {
            return;
        }
        var nodes = html.DocumentNode;

        img.Artist    = nodes.SelectSingleNode("*//li[@class='tag-type-artist']/a[2]")?.InnerText.Trim();
        img.Character = nodes.SelectSingleNode("*//li[@class='tag-type-character']/a[2]")?.InnerText.Trim();
        img.Copyright = nodes.SelectSingleNode("*//li[@class='tag-type-copyright']/a[2]")?.InnerText.Trim();
    }