public override int getChapterLength(Manga manga, Chapter c) { string chapURL = readURL + manga.urlName + "/" + c.url; string sourceCode = wc.DownloadString(chapURL); Regex regex = new Regex(@"Last Page \(([0-9]+)\)"); // "Last Page (number)" return Convert.ToInt32(regex.Match(sourceCode).Groups[1].Value); }
public override List<string> getChapterImages(Manga m, Chapter c) { int length = getChapterLength(m, c); List<string> images = new List<string>(); for (int i = 1; i <= length; i++) { string img = getImgURL(readURL + m.urlName + "/" + c.url + i); images.Add(img); } return images; }
/// <summary> /// returns the amount of pages from a chapter /// </summary> /// <param name="manga">selected Manga</param> /// <param name="c">c.url -> ex.: Last%20Scene/2557/</param> /// <returns>chapter length</returns> public abstract int getChapterLength(Manga manga, Chapter c);
/// <summary> /// gets all the images of one chapter /// </summary> /// <param name="m">selected Manga</param> /// <param name="c">c.url -> ex.: Last%20Scene/2557/ or 154/2528/</param> /// <returns>List of images</returns> public abstract List<string> getChapterImages(Manga m, Chapter c);
public override int getChapterLength(Manga manga, Chapter c) { throw new NotImplementedException(); }
public override List<string> getChapterImages(Manga m, Chapter c) { throw new NotImplementedException(); }