public static void ProcessMangashowme(string url) { Task.Run(() => { MainWindow.Instance.Fade_MiddlePopup(true, "접속중..."); var html = NetCommon.DownloadString(url); var articles = MangashowmeParser.ParseSeries(html); var title = MangashowmeParser.ParseTitle(html); MainWindow.Instance.ModifyText_MiddlePopup($"가져오는중...[0/{articles.Count}]"); for (int i = 0; i < articles.Count; i++) { articles[i].ImagesLink = MangashowmeParser.ParseImages(NetCommon.DownloadString(MangashowmeCommon.GetDownloadMangaImageAddress(articles[i].ArticleLink))); MainWindow.Instance.ModifyText_MiddlePopup($"가져오는중...[{i + 1}/{articles.Count}]"); } int count = 0; foreach (var article in articles) { string dir = Path.Combine(Path.Combine(Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), "mangashowme"), DeleteInvalid(title)), DeleteInvalid(article.Title)); Directory.CreateDirectory(dir); var se = Koromo_Copy.Interface.SemaphoreExtends.MakeDefault(); se.Referer = url; count += article.ImagesLink.Count; DownloadSpace.Instance.RequestDownload($"mangashow-me: {article.Title}", article.ImagesLink.ToArray(), article.ImagesLink.Select(x => Path.Combine(dir, HttpUtility.UrlDecode(HttpUtility.UrlDecode(x.Split('/').Last())))).ToArray(), se, dir + '\\', null ); } MainWindow.Instance.FadeOut_MiddlePopup($"{count}개({articles.Count} 작품) 항목 다운로드 시작..."); }); }
static void ProcessTest(string[] args) { switch (args[0]) { case "version": Version.ExportVersion(); break; case "manage": var t = new Thread(() => { Application.Run(new Manage()); }); t.Start(); break; case "preempt_dq": DownloadConsole.Instance.queue.Preempt(); break; case "unpreempt_dq": DownloadConsole.Instance.queue.Reactivation(); break; case "hiyobi": var html = Net.NetCommon.DownloadString("https://hiyobi.me/info/1305694"); var article = Component.Hiyobi.HiyobiParser.ParseGalleryConents(html); break; case "hiyobi2": var html1 = Net.NetCommon.DownloadString("https://hiyobi.me/list/1"); var article1 = Component.Hiyobi.HiyobiParser.ParseGalleryArticles(html1); break; case "query": HitomiDataSearchAdvanced.to_linear(HitomiDataSearchAdvanced.make_tree("(a b) - (c d) - (e f)")); break; case "version_check": Version.UpdateRequired(); break; case "dc": var html2 = Net.NetCommon.DownloadString("http://gall.dcinside.com/board/view/?id=comic_new1&no=7118416&page=1"); DCParser.ParseBoardView(html2); break; case "non-h": var html3 = Net.NetCommon.DownloadString("https://hiyobi.me/manga/info/1848"); HiyobiParser.ParseNonHArticles(html3); break; case "msm": var html4 = Net.NetCommon.DownloadString("http://mangashow.me/detail.php?manga_id=4969"); MangashowmeParser.ParseSeries(html4); var html5 = Net.NetCommon.DownloadString("http://mangashow.me/viewer.php?chapter_id=79688"); MangashowmeParser.ParseImages(html5); break; case "tree": var html6 = Net.NetCommon.DownloadString("https://www.google.com/search?q=anime&newwindow=1&rlz=1C1GIGM_enKR776KR776&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjS-J2cxejfAhWT-mEKHSpkCqsQ_AUIDigB&biw=1573&bih=814"); var tree = new HtmlTree(html6); tree.BuildTree(); Console.Instance.Write(Monitor.SerializeObject(tree.GetLevelImages(11))); break; case "ls": HtmlLocalServer.Instance.Start(); break; case "lpkor": var x = "진화론의 시야에서 벗어난 생물학은 아무 의미가 없다."; var xl = string.Join("", x.Select(y => LPKor.IsHangul(y) ? LPKor.Disassembly(y) : y.ToString())); Console.Instance.WriteLine(xl); var xr = LPKor.Assembly(xl); Console.Instance.WriteLine(xr); xl = string.Join("", x.Select(y => LPKor.IsHangul3(y) ? LPKor.Disassembly3(y) : y.ToString())); Console.Instance.WriteLine(xl); xr = LPKor.Assembly3(xl); Console.Instance.WriteLine(xr); break; case "heap": var rl = new List <int>(); var r = new Random(); for (int i = 0; i < 20; i++) { rl.Add(r.Next() % 100); } var h = new Heap <int>(); foreach (var xx in rl) { h.Push(xx); } rl.Sort(); rl.Reverse(); for (int i = 0; i < 20; i++) { Console.Instance.WriteLine($"{rl[i]}, {h.Front}"); h.Pop(); } var hh = new UpdatableHeap <int>(); break; case "ydl": ydlWrapper.download(); ydlWrapper.test(); break; case "stack": StackTrace st = new StackTrace(); Console.Instance.WriteLine(st.ToString()); break; } }
static void ProcessTest(string[] args) { switch (args[0]) { case "version": Version.ExportVersion(); break; case "manage": var t = new Thread(() => { Application.Run(new Manage()); }); t.Start(); break; case "preempt_dq": DownloadConsole.Instance.queue.Preempt(); break; case "unpreempt_dq": DownloadConsole.Instance.queue.Reactivation(); break; case "hiyobi": var html = Net.NetCommon.DownloadString("https://hiyobi.me/info/1305694"); var article = Component.Hiyobi.HiyobiParser.ParseGalleryConents(html); break; case "hiyobi2": var html1 = Net.NetCommon.DownloadString("https://hiyobi.me/list/1"); var article1 = Component.Hiyobi.HiyobiParser.ParseGalleryArticles(html1); break; case "query": HitomiDataSearchAdvanced.to_linear(HitomiDataSearchAdvanced.make_tree("(a b) - (c d) - (e f)")); break; case "version_check": Version.UpdateRequired(); break; case "dc": var html2 = Net.NetCommon.DownloadString("http://gall.dcinside.com/board/view/?id=comic_new1&no=7118416&page=1"); DCParser.ParseBoardView(html2); break; case "non-h": var html3 = Net.NetCommon.DownloadString("https://hiyobi.me/manga/info/1848"); HiyobiParser.ParseNonHArticles(html3); break; case "msm": var html4 = Net.NetCommon.DownloadString("http://mangashow.me/detail.php?manga_id=4969"); MangashowmeParser.ParseSeries(html4); var html5 = Net.NetCommon.DownloadString("http://mangashow.me/viewer.php?chapter_id=79688"); MangashowmeParser.ParseImages(html5); break; case "tree": var html6 = Net.NetCommon.DownloadString("https://www.google.com/search?q=anime&newwindow=1&rlz=1C1GIGM_enKR776KR776&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjS-J2cxejfAhWT-mEKHSpkCqsQ_AUIDigB&biw=1573&bih=814"); var tree = new HtmlTree(html6); tree.BuildTree(); Console.Instance.Write(Monitor.SerializeObject(tree.GetLevelImages(11))); break; case "ls": HtmlLocalServer.Instance.Start(); break; } }