public static List <Chapter> ToChapterList(string DOMAIN, MangaSite site, List <Dictionary <string, string> > results) { List <Chapter> chapterList = new List <Chapter>(); foreach (Dictionary <string, string> dic in results) { Chapter chapter = new Chapter(); chapter.ID = Guid.NewGuid().ToString(); chapter.Name = HttpUtility.HtmlDecode(dic["name"]); chapter.Url = HttpUtility.HtmlDecode(UrlUtils.FixUrl(DOMAIN, dic["url"])); chapter.Site = site; chapterList.Add(chapter); } return(chapterList); }
public static List <Manga> ToMangaList(string DOMAIN, MangaSite site, List <Dictionary <string, string> > results) { List <Manga> mangaList = new List <Manga>(); foreach (Dictionary <string, string> dic in results) { Manga manga = new Manga(); manga.ID = Guid.NewGuid().ToString(); manga.Name = HttpUtility.HtmlDecode(dic["name"]); manga.Url = HttpUtility.HtmlDecode(UrlUtils.FixUrl(DOMAIN, dic["url"])); manga.Site = site; mangaList.Add(manga); } return(mangaList); }