Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            HandleHelper handlehelper = new HandleHelper();

            while (true)
            {
                handlehelper.Clear();
                Console.WriteLine("start" + DateTime.Now);
                string          url          = "https://reserve.cdn-apple.com/HK/zh_HK/reserve/iPhone/availability.json";
                HttpWebRequest  requestScore = (HttpWebRequest)WebRequest.Create(url);
                string          html         = Awol.WebHelper.GetResponseStr(requestScore, "utf-8", null, null);
                MatchCollection matches      = Regex.Matches(html, "\"R.*?\"MKUD2ZP/A\".*?}", RegexOptions.Singleline);

                handlehelper.AddMail();
                foreach (Match mac in matches)
                {
                    handlehelper.GetDetail(mac.ToString());
                }
                handlehelper.Handle();
                handlehelper.Result();
                Thread.Sleep(3000);
            }
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            HandleHelper handlehelper = new HandleHelper();
            while (true)
            {
                handlehelper.Clear();
                Console.WriteLine("start" + DateTime.Now);
                string url = "https://reserve.cdn-apple.com/HK/zh_HK/reserve/iPhone/availability.json";
                HttpWebRequest requestScore = (HttpWebRequest)WebRequest.Create(url);
                string html = Awol.WebHelper.GetResponseStr(requestScore, "utf-8", null, null);
                MatchCollection matches = Regex.Matches(html, "\"R.*?\"MKUD2ZP/A\".*?}", RegexOptions.Singleline);

                handlehelper.AddMail();
                foreach (Match mac in matches)
                {

                    handlehelper.GetDetail(mac.ToString());
                }
                handlehelper.Handle();
                handlehelper.Result();
                Thread.Sleep(3000);

            }
        }