예제 #1
0
        public static void Execute(object obj)
        {
            var haoshenyin = (HaoShengYinObj)obj;

            LoopHelper.Count(50).Execute(() =>
            {
                var response = WxHttpRequestHelper.Get(haoshenyin.Url, haoshenyin.CookieStr);
                Console.WriteLine(response);
                Thread.Sleep(700);
            });
        }
예제 #2
0
        public static void BaoJieExecute(object obj)
        {
            LoopHelper.Count(10).Execute(
                () =>
            {
                var baojieObj = (BaojieObj)obj;

                var url       = "http://app.weibopie.com/wxapp/LivingartistApp/www/index.php?a=CRFRedHire&m=sendWhich";
                var cookieStr = "BIGipServerpool_qiye=1510320320.20480.0000";

                var valueDict = new Dictionary <string, string>
                {
                    { "openid", baojieObj.OpenId },
                    { "passCode", "8096" }
                };
                //"ocJOVjs1avvXyOMIQXmzZyqiG1Kg"
                var headerList = new List <string>
                {
                    "Origin: http://app.weibopie.com",
                    baojieObj.Referer,
                    "Content-Type: application/x-www-form-urlencoded; charset=UTF-8"
                };

                var response = WxHttpRequestHelper.Post(url, valueDict, headerList, cookieStr);
                Console.WriteLine(response);

                LoopHelper.Count(2).Execute(() =>
                {
                    var getUrl =
                        "http://app.weibopie.com/wxapp/LivingartistApp/www/index.php?a=CRFRedHire&m=scoreNotice&openid=" +
                        baojieObj.OpenId;

                    var headerList2 = new List <string>
                    {
                        "Origin: http://app.weibopie.com",
                        baojieObj.Referer,
                        "Content-Type: application/x-www-form-urlencoded; charset=UTF-8"
                    };

                    var response2 = WxHttpRequestHelper.Get(getUrl, cookieStr, headerList2);
                    Console.WriteLine(response2);
                    Thread.Sleep(700);
                });
            }
                );
        }