public async Task MangaStream_Test() { string url = "https://readms.net/manga/dragon_ball_super"; var service = new MangaStream(logger, downloader, new HtmlAtilityPackAdapter()); Assert.IsTrue(service.Of(url)); var chapters = await service.FindChapters(url, new Progress <int>(), source.Token); Assert.IsTrue(chapters.Any(), "Cannot find chapters."); var chapter = chapters.Last(); Assert.AreEqual("Dragon Ball Super", chapter.Manga); Assert.AreEqual("001 - The God of Destruction's Prophetic Dream", chapter.DisplayName); Assert.AreEqual("https://readms.net/r/dragon_ball_super/001/2831/1", chapter.Url); var images = await service.FindImages(chapter, new Progress <int>(), source.Token); Assert.AreEqual(17, images.Count()); Assert.IsTrue(images.ToArray()[0].StartsWith("https://img.mangastream.com/cdn/manga/107/2831/001.jpg")); Assert.IsTrue(images.ToArray()[1].StartsWith("https://img.mangastream.com/cdn/manga/107/2831/001a.jpg")); Assert.IsTrue(images.ToArray()[2].StartsWith("https://img.mangastream.com/cdn/manga/107/2831/002.png")); string imageString = await downloader.DownloadStringAsync(images.ToArray()[0], source.Token); Assert.IsNotNull(imageString, "Cannot download image!"); }
public async Task FindChapters() { string url = "https://readms.net/manga/dragon_ball_super"; Assert.True(service.Of(url)); var chapters = await service.GetChapters(url, new Progress <string>(), source.Token); Assert.True(chapters.Any(), "Cannot find chapters."); var chapter = chapters.Last(); Assert.Equal("Dragon Ball Super 001 - The God of Destruction's Prophetic Dream", chapter.Name); Assert.Equal("https://readms.net/r/dragon_ball_super/001/2831/1", chapter.Url); }