public override void download_one_scan(String link, String nb_page, String chapter, String path) { String[] content = HtmlRequest.get_html(link); foreach (String i in content) { if (i.IndexOf("onerror=\"javascript:rerender(this);\"") != -1) { String link_img = HtmlRequest.cut_str(i, "<img src=\"", "\" onerror"); int pos = link_img.LastIndexOf("."); int pos2 = link_img.LastIndexOf("?"); String ext = link_img.Substring(pos, pos2 - pos); String nb_chapter = chapter.ToString(); if (float.Parse(chapter, CultureInfo.InvariantCulture.NumberFormat) < 10) { nb_chapter = "0" + nb_chapter; } if (Int32.Parse(nb_page) < 10) { nb_page = "0" + nb_page; } if (link.IndexOf("javascript") == -1) { HtmlRequest.save_image(link_img, path + "chap " + nb_chapter + " page " + nb_page + ext); } return; } } }
public override void download_one_scan(String link, String nb_page, String chapter, String path) { String[] content = HtmlRequest.get_html(link); foreach (String i in content) { if (i.IndexOf("class=\"img-responsive-2\" style=\"cursor: pointer !important;\"") != -1) { String link_img = HtmlRequest.cut_str(i, "src=\"", "\" class"); int pos_point = link_img.LastIndexOf('.'); String ext = link_img.Substring(pos_point); String nb_chapter = chapter.ToString(); if (float.Parse(chapter, CultureInfo.InvariantCulture.NumberFormat) < 10) { nb_chapter = "0" + nb_chapter; } if (Int32.Parse(nb_page) < 10) { nb_page = "0" + nb_page; } HtmlRequest.save_image(link_img, path + "chap " + nb_chapter + " page " + nb_page + ext); } } }
public override void load_all_mangas() { allManga = new List <KeyValuePair <String, String> >(); String[] content = HtmlRequest.get_html(link_list_manga); if (content == null) { allManga = null; return; } foreach (String i in content) { String[] stringSeparators = new String[] { "</li><li>" }; if (i.IndexOf("<li><a class=\"manga_info\" rel=\"") != -1) { String[] manga; manga = i.Split(stringSeparators, StringSplitOptions.None); foreach (String m in manga) { String name = HtmlRequest.cut_str(m, "rel=\"", "\" href=").Replace(""", "-").Replace("&", "&"); String link = HtmlRequest.cut_str(m, "\" href=\"", "\"><span>"); allManga.Add(new KeyValuePair <String, String>(name, link)); } } } }
public override void download_one_scan(String link, String nb_page, String chapter, String path) { String[] content = HtmlRequest.get_html(link); foreach (String i in content) { if (i.IndexOf("<img data-img=") != -1) { String link_img = HtmlRequest.cut_str(i, "src=\"", "\"/>"); int pos_point = link_img.LastIndexOf('.'); String ext = link_img.Substring(pos_point); String nb_chapter = ""; if (float.Parse(chapter, CultureInfo.InvariantCulture.NumberFormat) < 10) { nb_chapter = "0" + chapter.ToString(); } if (Int32.Parse(nb_page) < 10) { nb_page = "0" + nb_page; } if (chapter != "") { HtmlRequest.save_image(link_img, path + "chap " + nb_chapter + " page " + nb_page + ext); } else { HtmlRequest.save_image(link_img, path + "page " + nb_page + ext); } } } }
private void load_page_manga(String link) { String[] content = HtmlRequest.get_html(link); foreach (String i in content) { if (i.IndexOf("<span class=\"manga-item\">") != -1) { String str = i.Trim(); String n_link = HtmlRequest.cut_str(str, "<a href=\"", "\">"); String name = HtmlRequest.cut_str(str, n_link + "\">", "</a>"); allManga.Add(new KeyValuePair <String, String>(name, n_link)); } } }
public override void load_chapters(KeyValuePair <String, String> infos) { String[] html = HtmlRequest.get_html(infos.Value); List <String[]> array_positions = new List <string[]>(); list_chapter.Clear(); int is_start = 0; name = infos.Key; link = infos.Value; String[] tab; String n_link = ""; String desc = ""; foreach (String i in html) { String str = i.Trim(); if (str.IndexOf("<ul class=\"chp_lst\">") != -1) { is_start = 1; } if (is_start == 1 && str.IndexOf("<a href=\"") != -1) { n_link = HtmlRequest.cut_str(str, "<a href=\"", "\">"); } if (is_start == 1 && str.IndexOf("<span class=\"val\">") != -1) { desc = HtmlRequest.cut_str(str, "\"></span>", " </span>"); tab = new String[3]; tab[0] = "1"; tab[1] = String.Copy(n_link); tab[2] = String.Copy(desc); list_chapter.Add(tab); } } nb_tomes = 0; }
public override void load_chapters(KeyValuePair <String, String> infos) { String[] html = HtmlRequest.get_html(infos.Value); List <String[]> array_positions = new List <string[]>(); int found; name = infos.Key; link = infos.Value; list_chapter.Clear(); int is_start = 0; String[] tab; foreach (String i in html) { found = i.IndexOf("<a href=\"/"); if (i.IndexOf("<th class=\"leftgap\">Chapter Name</th>") != -1) { is_start = 1; } if (found == 0 && is_start == 1) { int end_pos = i.IndexOf("/\">"); String link = HtmlRequest.cut_str(i, "<a href=\"", "\">"); String desc = HtmlRequest.cut_str(i, "\">", "</a>") + " : " + HtmlRequest.cut_str(i, "</a> : ", "</td>"); tab = new String[3]; tab[0] = "1"; tab[1] = link; tab[2] = desc; list_chapter.Add(tab); } } nb_tomes = 0; }
public override void load_all_mangas() { allManga = new List <KeyValuePair <String, String> >(); String[] content = HtmlRequest.get_html(link_list_manga); int is_start = 0; if (content == null) { allManga = null; return; } foreach (String i in content) { if (i.IndexOf("<div class=\"series_col\"><a name=\" \"></a>") != -1) { is_start = 1; } if (i.IndexOf("<li><b>Network</b></li>") != -1) { is_start = 0; } if (i.IndexOf("<li><a href=\"/") != -1 && is_start == 1) { String str; if (i.IndexOf("<ul class=\"series_alpha\">") != -1) { str = i.Substring(25); } else { str = i; } String name = HtmlRequest.cut_str(str, "\">", "</a>"); String link = HtmlRequest.cut_str(str, "<li><a href=\"", "\">"); allManga.Add(new KeyValuePair <String, String>(name, "http://www.mangareader.net" + link)); } } }
public override void load_all_mangas() { allManga = new List <KeyValuePair <String, String> >(); String[] content = HtmlRequest.get_html(link_list_manga); if (content == null) { allManga = null; return; } foreach (String i in content) { if (i.IndexOf("<div class=\"cell\"><a href=\"/mangas/") != -1 && i.IndexOf("blackout") == -1) { String name = HtmlRequest.cut_str(i, "/\">", "</a></div>"); String link = HtmlRequest.cut_str(i, "<a href=\"", "/\">"); allManga.Add(new KeyValuePair <String, String>(name, "http://www.japscan.com" + link + "/")); } } }
public override void load_chapters(KeyValuePair <String, String> infos) { Debug.WriteLine("Load Chapter"); String[] html = HtmlRequest.get_html(infos.Value); List <String[]> array_positions = new List <string[]>(); this.name = infos.Key; this.link = infos.Value; list_chapter.Clear(); int is_chapter_list = 0; int is_start = 0; String[] tab; String link = ""; String desc; foreach (String i in html) { if (i.IndexOf("has been licensed") != -1) { tab = new String[3]; tab[0] = "1"; tab[1] = ""; tab[2] = "Manga has been licensed"; list_chapter.Add(tab); break; } if (i.IndexOf("<div class=\"detail_list\">") != -1) { is_chapter_list = 1; Debug.WriteLine(i); } if (i.IndexOf("<a class=\"color_0077\"") != -1 && is_chapter_list == 1) { is_start = 1; link = HtmlRequest.cut_str(i, "href=\"", "\" >"); } if (i.IndexOf("</a>") != -1 && is_start == 1) { is_start = 0; desc = i.Substring(0, i.IndexOf("</a>")); tab = new String[3]; tab[0] = "1"; tab[1] = link; tab[2] = desc; list_chapter.Insert(0, tab); } if (i.IndexOf("class=\"tab_comment clearfix\">") != -1 && is_chapter_list == 1) { is_chapter_list = 0; } } nb_tomes = 0; }