Example #1
0
        private static void Nc_RequestComplete(object sender, NetCut.NetTab e)
        {
            string requestStr = e.Service.ToString() + ":/" + e.Url;

            if (counter > 10)
            {
                Console.WriteLine("解析超时,可能是网络拥堵,请过两分钟再试.");
                nc.Uninstall();
                _continue = false;
                return;
            }
            if (requestStr.Contains(vid) && requestStr.Contains(".mp4") && requestStr.Contains("vkey="))
            {
                Console.WriteLine("Found one:" + DateTime.Now.ToString("ss"));
                string testUrl = e.Url.Split('/')[1];
                if (testUrl.Contains("qq.com"))
                {
                    Console.WriteLine(requestStr);
                    nc.Uninstall();
                    _continue = false;
                }
                else
                {
                    Console.WriteLine("Pass it,refresh:" + DateTime.Now.ToString("ss"));
                    counter++;

                    wb.Refresh();
                }
            }
            else
            {
                Console.WriteLine("Pass one:" + DateTime.Now.ToString("ss"));
            }
        }
Example #2
0
 //得到gtk,uin <=步骤2
 private void _NetCut_RequestComplete(object sender, NetCut.NetTab e)
 {
     base.Invoke(new EventHandler((x, y) =>
     {
         string requestStr = e.Service.ToString() + e.Url.ToString();
         if (requestStr.Contains("sweet_share_getbyhouse"))
         {
             MessageBox.Show(e.Service.ToString() + ";" + e.Url.ToString());
             g_tk = RegexHelper.GetMatch(requestStr, "(?<=g_tk=)\\d*?(?=\\D)");
             uin  = RegexHelper.GetMatch(requestStr, "(?<=uin=)\\d*?(?=\\D)");
             _NetCut.Uninstall();
             WaitNavigated();
             this.Width       = 350;
             btnStart.Enabled = true;
             btnStart.Text    = "登陆成功,点击这里开始捕获数据!!";
             AddResult("登陆成功!");
             AddResult("点击上方按钮开始捕获数据...");
         }
     }
                                  ));
 }