public static async Task<string> GetDetailVTT(string html) { try { var node = GetValueNode.GetNode.GetOneTag(html, "div", "class", "storyInfo"); string detailUrlCover = GetValueNode.GetNode.GetValueHtml(node, new int[] { 1, 1 }, "src"); string detailNameManga = GetValueNode.GetNode.GetValueHtml(node, new int[] { 1, 3, 1 }, ""); string rate = GetValueNode.GetNode.GetValueHtml(node, new int[] { 1, 3, 7, 1 }, "data-rating"); string detailDescription = GetValueNode.GetNode.GetValueHtml(node, new int[] { 5, 3, 1 }, ""); ; if (string.IsNullOrEmpty(detailDescription)) { detailDescription = "Đang cập nhật..."; } rate = rate.Replace(".", ","); GetData.detail = new Detail { _detailNameManga = detailNameManga, _rating = rate, _detailUrlCover = detailUrlCover, _detailDescription = detailDescription }; GetData.detail.listChap = await GetData.GetChapVTT(html); if (GetData.detail != null) { GetData.jsonDetail.status = true; } else { GetData.jsonDetail.status = false; } } catch { GetData.jsonDetail.status = false; } return GetData.ConvertDetailToJsonDetail(); }
public static async Task<string> GetDetailTTT(string html) { try { var node = GetValueNode.GetNode.GetOneTag(html, "div", "id", "infor-box"); string detailUrlCover = GetValueNode.GetNode.GetValueHtml(node, new int[] { 1, 1 }, "src"); string detailNameManga = GetValueNode.GetNode.GetValueHtml(node, new int[] { 3, 1 }, ""); string rate = GetValueNode.GetNode.GetValueHtml(GetValueNode.GetNode.GetOneTag(html, "span", "id", "rating-point"), new int[] { }, "").Trim(); string detailDecription = GetValueNode.GetNode.GetValueHtml(node, new int[] { 3, 3, 12 }, ""); if (!string.IsNullOrEmpty(detailDecription)) { detailDecription = WebUtility.HtmlDecode(detailDecription); } else { detailDecription = "Đang cập nhật..."; } rate = rate.Replace(".", ","); GetData.detail = new Detail { _detailNameManga = detailNameManga, _rating = rate, _detailUrlCover = detailUrlCover, _detailDescription = detailDecription }; GetData.detail.listChap = await GetData.GetChapTTT(html); if (GetData.detail != null) { GetData.jsonDetail.status = true; } else { GetData.jsonDetail.status = false; } } catch { GetData.jsonDetail.status = false; } return GetData.ConvertDetailToJsonDetail(); }
public static async Task<string> GetDetailComicVN(string html) { try { var parentNode = GetValueNode.GetNode.GetOneTag(html, "div", "class", "item-detail-left"); var listNode = GetValueNode.GetNode.GetListNode(parentNode); string detailUrlCover = GetValueNode.GetNode.GetValueHtml(listNode[0], new int[] {3,3,1 }, "src"); string detailNameManga = WebUtility.HtmlDecode(GetValueNode.GetNode.GetValueHtml(listNode[0], new int[] { 3,3,1 }, "alt").Trim()); List<HtmlNode> list = GetValueNode.GetNode.GetListNodeToNode(listNode[0], new int[] { 3,5,1 }); string text = "5.5"; string detailDescription = ""; if (list.Count > 0) { foreach (var item in list) { if (item.Name == "#text") { continue; } detailDescription += "\n" + GetValueNode.GetNode.GetValueHtml(item, new int[] { }, ""); } } else { detailDescription = "Đang cập nhật..."; } text = text.Replace(".", ","); GetData.detail = new Detail { _detailNameManga = detailNameManga, _rating = text, _detailUrlCover = detailUrlCover, _detailDescription = detailDescription }; GetData.detail.listChap = await GetData.GetChapComicVN(html, detailNameManga); if (GetData.detail != null) { GetData.jsonDetail.status = true; } else { GetData.jsonDetail.status = false; } } catch { GetData.jsonDetail.status = false; } return GetData.ConvertDetailToJsonDetail(); }
public static async Task<string> GetDetailFPhimSex(string html) { try { HtmlDocument htmlDocument = new HtmlDocument(); htmlDocument.LoadHtml(html); var node = GetValueNode.GetNode.GetOneTag(html, "div", "class", "col-md-9 baiviet baiviet_tintuc"); string detailUrlCover = GetValueNode.GetNode.GetValueHtml(node, new int[] { 5,1}, "src"); string detailNameManga = GetValueNode.GetNode.GetValueHtml(node, new int[] { 5,1}, "alt"); string rating = "3.5"; string description = "Đang cập nhật..."; GetData.detail = new Detail { _detailNameManga = detailNameManga, _rating = rating, _detailUrlCover = detailUrlCover, _detailDescription = description }; GetData.detail.listChap = await GetData.GetChapFPhimSex(html); if (GetData.detail != null) { GetData.jsonDetail.status = true; } else { GetData.jsonDetail.status = false; } } catch { GetData.jsonDetail.status = false; } return GetData.ConvertDetailToJsonDetail(); }
public static async Task<string> GetDetailTT8(string html) { try { HtmlDocument htmlDocument = new HtmlDocument(); htmlDocument.LoadHtml(html); HtmlNode parentNode = GetValueNode.GetNode.GetOneTag(html, "div", "class", "MangaInfo"); string detailUrlCover = GetValueNode.GetNode.GetValueHtml(parentNode, new int[] { 5, 1, 0 }, "src"); string detailNameManga = WebUtility.HtmlDecode(GetValueNode.GetNode.GetValueHtml(parentNode, new int[] { 1, 0 }, "").Trim()); string text = GetValueNode.GetNode.GetValueHtml(parentNode, new int[] { 9, 5 }, "data-average").Trim(); string detailDescription = WebUtility.HtmlDecode(GetValueNode.GetNode.GetValueHtml(parentNode, new int[] { 11 }, "").Trim()); if (string.IsNullOrEmpty(detailDescription)) { detailDescription = "Đang cập nhật..."; } text = text.Replace(".", ","); GetData.detail = new Detail { _detailNameManga = detailNameManga, _rating = text, _detailUrlCover = detailUrlCover, _detailDescription = detailDescription }; GetData.detail.listChap = await GetData.GetChapTT8(html, detailNameManga); if (GetData.detail != null) { GetData.jsonDetail.status = true; } else { GetData.jsonDetail.status = false; } } catch { GetData.jsonDetail.status = false; } return GetData.ConvertDetailToJsonDetail(); }
public static async Task<string> GetDetailBlogTruyen(string html) { try { var node = GetValueNode.GetNode.GetOneTag(html, "section", "class", "bg-white story-detail"); Dictionary<string, string> replace = new Dictionary<string, string>(); replace.Add("truyện tranh ", ""); string detailUrlCover = GetValueNode.GetNode.GetValueHtml(node, new int[] { 5, 1 }, "src"); string detailNameManga =GetValueNode.GetNode.GetValueHtml(node, new int[] { 3, 1 }, "title", replace); string rating = "3.5"; string detailDecription = GetValueNode.GetNode.GetValueHtml(node, new int[] { 7, 3 }, ""); if (string.IsNullOrEmpty(detailDecription)) { detailDecription = "Đang cập nhật..."; } GetData.detail = new Detail { _detailNameManga = detailNameManga, _rating = rating, _detailUrlCover = detailUrlCover, _detailDescription = detailDecription }; GetData.detail.listChap = await GetData.GetChapBlogTruyen(html); if (GetData.detail != null) { GetData.jsonDetail.status = true; } else { GetData.jsonDetail.status = false; } } catch { GetData.jsonDetail.status = false; } return GetData.ConvertDetailToJsonDetail(); }
public static async Task<string> GetDetailHamTruyen(string html) { try { var node = GetValueNode.GetNode.GetOneTag(html, "div", "id", "content_truyen"); string detailUrlCover = GetValueNode.GetNode.GetValueHtml(node, new int[] { 1, 1 }, "src"); string detailNameManga = GetValueNode.GetNode.GetValueHtml(node, new int[] { 2, 0 }, ""); string rate = GetValueNode.GetNode.GetValueHtml(node, new int[] { 2, 8 }, ""); string detailDecription = GetValueNode.GetNode.GetValueHtml(node, new int[] { 2, 11 }, ""); if (string.IsNullOrEmpty(detailDecription)) { detailDecription = "Đang cập nhật..."; } GetData.detail = new Detail { _detailNameManga = detailNameManga, _rating = rate, _detailUrlCover = detailUrlCover, _detailDescription = detailDecription }; GetData.detail.listChap = await GetData.GetChapHamTruyen(html); if (GetData.detail != null) { GetData.jsonDetail.status = true; } else { GetData.jsonDetail.status = false; } } catch { GetData.jsonDetail.status = false; } return GetData.ConvertDetailToJsonDetail(); }
public static async Task<string> GetDetailIZManga(string html) { try { var node = GetValueNode.GetNode.GetOneTag(html, "div", "class", "manga-info-top"); string detailUrlCover = "http://izmanga.com" + GetValueNode.GetNode.GetValueHtml(node, new int[] { 1, 1 }, "src"); string detailNameManga = GetValueNode.GetNode.GetValueHtml(node, new int[] { 3, 1, 1 }, ""); string detailDescription = GetValueNode.GetNode.GetValueHtml(node, new int[] { 3 }, ""); if (string.IsNullOrEmpty(detailDescription)) { detailDescription = "Đang cập nhật..."; } string rating = "40"; GetData.detail = new Detail { _detailNameManga = detailNameManga, _rating = rating, _detailUrlCover = detailUrlCover, _detailDescription = detailDescription }; GetData.detail.listChap = await GetData.GetChapIZManga(html); if (GetData.detail != null) { GetData.jsonDetail.status = true; } else { GetData.jsonDetail.status = false; } } catch { GetData.jsonDetail.status = false; } return GetData.ConvertDetailToJsonDetail(); }