예제 #1
0
파일: Program.cs 프로젝트: xxy1991/cozy
        static void Main(string[] args)
        {
            var p1 = new BlockedUrlGeneraterRunner();
            var p2 = new BlockedUrl2ResultRunner();

            var urls = new Component.UrlGenerater.FixedUrls();
            for (int i = 0; i <= 3; ++i)
            {
                urls.Urls.Add("https://kyfw.12306.cn/otn/passcodeNew/getPassCodeNew?module=login&rand=sjrand&" + r.NextDouble().ToString().Substring(0, 10));
            }

            var downloader = new Component.Url2Result.JpgDownloader();
            downloader.SetSavePath(@"g:\res\");

            p1.From(urls);
            p1.To(p2);
            p2.To(downloader);

            p2.Start();
            p1.Start();
        }
예제 #2
0
        static void Main(string[] args)
        {
            var p1 = new BlockedUrlGeneraterRunner();
            var p2 = new BlockedUrl2ResultRunner();

            var urls = new Component.UrlGenerater.FixedUrls();

            for (int i = 0; i <= 3; ++i)
            {
                urls.Urls.Add("https://kyfw.12306.cn/otn/passcodeNew/getPassCodeNew?module=login&rand=sjrand&" + r.NextDouble().ToString().Substring(0, 10));
            }

            var downloader = new Component.Url2Result.JpgDownloader();

            downloader.SetSavePath(@"g:\res\");

            p1.From(urls);
            p1.To(p2);
            p2.To(downloader);

            p2.Start();
            p1.Start();
        }