public static List <ResultSet> CheckProcessor(CampName type, List <string> dateList)
        {
            List <ResultSet> resultList = new List <ResultSet>();

            if (dateList == null || dateList.Count == 0)
            {
                throw new Exception("날짜를 1일이상 선택하세요");
            }

            // 년월 목록 조회
            var yyyymmlist = dateList.GroupBy(x => x.Substring(0, 6)).Select(x => x.Key);

            foreach (var yyyymm in yyyymmlist)
            {
                // 파라미터 생성
                List <Querystring> paramList = ParamHelper.GetParamList(type, yyyymm);

                // 조회
                var result = Task.Run <string>(async() => await Scrapper.RequestHttpClient(_url, Method.PORT, paramList));
                result.Wait();
                var text = result.Result;

                // 자리 확인
                resultList = UsableSiteChecker(type, text, dateList.Where(x => x.Substring(0, 6) == yyyymm).ToList());
            }

            return(resultList);
        }
Beispiel #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            string             url       = "http://forest.maketicket.co.kr/camp/reserve/calendar.jsp";
            List <Querystring> paramList = new List <Querystring>();

            paramList.Add(new Querystring("idkey", "5M4240"));
            paramList.Add(new Querystring("gd_seq", "GD84"));
            paramList.Add(new Querystring("yyyymmdd", "20190524"));
            paramList.Add(new Querystring("sd_date", "20190524"));
            var resultText = Scrapper.Scraping(url, Method.PORT, paramList);

            MessageBox.Show(resultText);
        }
Beispiel #3
0
        private void CallInterparkSelectDate()
        {
            string             url       = "http://ticket.interpark.com/Ticket/Goods/GoodsInfoJSON.asp";
            List <Querystring> paramList = new List <Querystring>();

            paramList.Add(new Querystring("Flag", "UseCheckIn"));
            paramList.Add(new Querystring("GoodsCode", "18007398"));
            paramList.Add(new Querystring("PlaceCode", "18000660"));
            paramList.Add(new Querystring("PlayDate", "20190505"));
            paramList.Add(new Querystring("Callback", "fnPlayDateChangeCallBack"));

            var result = System.Threading.Tasks.Task.Run <string>(async() => await Scrapper.RequestHttpClient(url, Method.GET, paramList));

            result.Wait();
            var text = result.Result;
        }
Beispiel #4
0
        private void CallInterparkCalendar()
        {
            //   /Ticket/Goods/ifrCalendar.asp?GoodsCode=18007398&PlaceCode=18000660&OnlyDeliver=68006&DBDay=12&ExpressDelyDay=0&YM=201905
            string             url       = "http://ticket.interpark.com/Ticket/Goods/ifrCalendar.asp";
            List <Querystring> paramList = new List <Querystring>();

            paramList.Add(new Querystring("GoodsCode", "18007398"));
            paramList.Add(new Querystring("PlaceCode", "18000660"));
            paramList.Add(new Querystring("OnlyDeliver", "68006"));
            paramList.Add(new Querystring("DBDay", "12"));
            paramList.Add(new Querystring("ExpressDelyDay", "0"));
            paramList.Add(new Querystring("YM", "201905"));

            var result = System.Threading.Tasks.Task.Run <string>(async() => await Scrapper.RequestHttpClient(url, Method.GET, paramList));

            result.Wait();
            var text = result.Result;
        }