Esempio n. 1
0
        /// <summary>
        /// 下架物品
        /// </summary>
        /// <returns></returns>
        public bool DownItem()
        {
            GetWebPageDate.Http.HttpRequest http = new GetWebPageDate.Http.HttpRequest();

            http.Cookie = "Hm_lvt_ed70f863f631ecaac146592025767ed8=1509785002; Qs_lvt_150743=1509785002; Qs_pv_150743=3457133030228596700; NTKF_T2D_CLIENTID=guestTEMP1758-0E75-6A74-9EB9-8632DF7CEB19; acw_tc=AQAAALQugFvwMw4A3eT4OjtYTVthFUKH; PHPSESSID=cvbcvjhi3a70qu9drah6l31ht0; sellerCooke=think%3A%7B%22sellerName%22%3A%22hankang%22%2C%22sellerStoreName%22%3A%22%25E9%2595%25BF%25E6%25B2%2599%25E5%258E%25BF001%25E5%25BA%2597%22%7D; Hm_lvt_7203bc79de07054ef3770e27e8ca9068=1509780503,1509934350,1510060776; Hm_lpvt_7203bc79de07054ef3770e27e8ca9068=1510061193";

            string downUrl = "https://admin.tkyfw.com/Goods/edit_dowmGoods";

            BaseReadWebPage res = new BaseReadWebPage();

            res.ReadBaseItemInfo("TKAdmin/NotEixst.csv", true);

            BaseReadWebPage res1 = new BaseReadWebPage();

            res1.ReadBaseItemInfo("TKAdmin/低于20以上.csv", true);
            string postData = "storeid={0}&off_the_shelf=";

            int curCount = 0;

            int totalCount = res.ShopAllItems.Count + res1.ShopAllItems.Count;

            //foreach(BaseItemInfo item in res.ShopAllItems.Values)
            //{
            //    Console.WriteLine("curCount:{0}, totalCount:{1}", curCount++, totalCount);
            //    http.HttpPost(downUrl, string.Format(postData, item.ViewCount));
            //}

            foreach (BaseItemInfo item in res1.ShopAllItems.Values)
            {
                Console.WriteLine("curCount:{0}, totalCount:{1}", curCount++, totalCount);
                http.HttpPost(downUrl, string.Format(postData, item.ViewCount));
            }

            return(true);
        }
Esempio n. 2
0
        /// <summary>
        /// 修改所有在售物品的价格
        /// </summary>
        /// <returns></returns>
        public bool UpdateAllSellingItemPrice(string itemStr, GetWebPageDate.Http.HttpRequest http, decimal upParam = 1)
        {
            itemStr = itemStr.Replace('\n', ' ');
            itemStr = itemStr.Replace('\t', ' ');
            MatchCollection ms = CommonFun.GetValues(itemStr, "<div class=\"tkprolistbox\">", "修改");

            foreach (Match m in ms)
            {
                ItemInfo item = GetOneItem(m.Value);

                string tag = CommonFun.GetValue(m.Value, "promotionEd=\"", "\"");

                decimal price = GetPlatformPrice(item.ID, item.Format, http);

                string info = "";

                if (item.Type != "333" && price != decimal.MaxValue && item.PlatformPrice != price)
                {
                    info = UpdatePrice(http, price * upParam, item.ViewCount, item.Type, item.Inventory);

                    Thread.Sleep(random.Next(3, 6) * 1000);

                    if (info != "1")
                    {
                        string priceStr = CommonFun.GetValue(info, ":\"", "\"");

                        price = 0;

                        try
                        {
                            price = Convert.ToDecimal(priceStr);
                            if (price != 1)
                            {
                                price = (decimal)((double)price - 0.01);
                            }
                            else
                            {
                                price = GetItemPrice(item);
                            }
                        }
                        catch (Exception ex)
                        {
                            Console.WriteLine(ex);
                        }

                        if (price != item.PlatformPrice)
                        {
                            UpdatePrice(http, price, item.ViewCount, tag, item.Inventory);
                        }
                    }
                }
                item.ShopPrice = price;
                CommonFun.WriteCSV("TKAdmin/TKAdmin" + fileName + ".csv", item);
            }
            return(true);
        }
        public override void Login()
        {
            string login_url = "http://reg.yaofangwang.cn/login.aspx";

            string postDataStr = string.Format("__EVENTTARGET=ctl00%24ContentPlaceHolder1%24t_login&__EVENTARGUMENT=&__VIEWSTATE=%2FwEPDwULLTE5NDEyNTg5OTlkGAEFHl9fQ29udHJvbHNSZXF1aXJlUG9zdEJhY2tLZXlfXxYBBSVjdGwwMCRDb250ZW50UGxhY2VIb2xkZXIxJGNiX1JlbWVtYmVycDfW9s57mnaJlPJZ%2FE5mlJKdAKY%3D&__VIEWSTATEGENERATOR=C2EE9ABB&__EVENTVALIDATION=%2FwEdAAXeB%2FnDyv7zWG1mzCLKNLgh%2FX3Fo%2FRaqYiLtErA%2B0XLEhccBLe9MIf%2BOeu1SwHT%2Fo0qqYLAmC5XXoyC%2BBAAg4gzqjQqitXSuUDfVH%2BcB8vH1lMEkbab73pTz5gdxWw0I0ubruCR&ctl00%24ContentPlaceHolder1%24txt_AccountName={0}&ctl00%24ContentPlaceHolder1%24txt_Password={1}", username, password);

            try
            {
                GetWebPageDate.Http.HttpRequest http = new GetWebPageDate.Http.HttpRequest();

                CookieContainer cookies = new CookieContainer();

                byte[] postData = Encoding.UTF8.GetBytes(postDataStr);

                HttpWebRequest loginRequest = (HttpWebRequest)WebRequest.Create(login_url);
                ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);
                loginRequest.ProtocolVersion = HttpVersion.Version11;
                // 这里设置了协议类型。
                ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;// SecurityProtocolType.Tls1.2;
                loginRequest.Method        = "POST";
                loginRequest.KeepAlive     = false;
                loginRequest.Timeout       = 1000000;
                loginRequest.ContentType   = "application/x-www-form-urlencoded; charset=UTF-8";
                loginRequest.Referer       = "https://admin.tkyfw.com/Seller_login.html";
                loginRequest.ContentLength = postData.Length;
                loginRequest.UserAgent     = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)";
                //cookie.SetCookies(request.RequestUri, "Qs_lvt_150743=1500685870%2C1500777689; NTKF_T2D_CLIENTID=guestBC81D14C-3099-FCD9-FE94-67D92C0B496A; Hm_lvt_ed70f863f631ecaac146592025767ed8=1500685870; Qs_pv_150743=1447053609678541000%2C3007060151905128000%2C355027317986517250%2C1201566385246198500%2C3405144643715530000; Hm_lvt_3ad2c5e8712b25159b989a93a9927632=1500685895; acw_tc=AQAAAIyCqm27gAQABUULt6WUgM5Ca2iH; PHPSESSID=1sighr4l5nqe1dj4536u1mh2v3; __guid=202919361.837275310285311200.1509859920993.7488; renren_tag_0526=isTag; sellerCooke=think%3A%7B%22sellerName%22%3A%22hankang%22%2C%22sellerStoreName%22%3A%22%25E9%2595%25BF%25E6%25B2%2599%25E5%258E%25BF001%25E5%25BA%2597%22%7D; Hm_lvt_7203bc79de07054ef3770e27e8ca9068=1509860118; Hm_lpvt_7203bc79de07054ef3770e27e8ca9068=1509860118; monitor_count=3");
                loginRequest.CookieContainer = new CookieContainer();
                Stream myRequestStream = loginRequest.GetRequestStream();
                myRequestStream.Write(postData, 0, postData.Length);
                myRequestStream.Close();

                HttpWebResponse response = (HttpWebResponse)loginRequest.GetResponse();

                //response.Cookies = cookie.GetCookies(response.ResponseUri);

                Stream myResponseStream = response.GetResponseStream();
                cookies.Add(response.Cookies);
                StreamReader myStreamReader = new StreamReader(myResponseStream, Encoding.GetEncoding("utf-8"));
                string       retString      = myStreamReader.ReadToEnd();

                myStreamReader.Close();
                myResponseStream.Close();
                //request.CookieContainer = cookies;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                Login();
            }

            request.Cookie = "__jsluid=00722fe4a2305a1f7e6e44e846a302ce; ASP.NET_SessionId=nmfxaoaonht2wzmiafye2w4v; Hm_lvt_3f534012f862ad7faa732b5b0655ce2f=1514443356; historysearch=; Hm_lpvt_3f534012f862ad7faa732b5b0655ce2f=1514456516; YaoTuWang_Passport_Identity=B833BEC308E7119F829C15C2FA15A1E061121AE12FE2BA42ED50F150A203050AE7F7DA8CE4DAC6D45CBD54C7ADF227F785BB989415C6391B326494E5D01B1B3B4DC1915F92E0B76DF720317BF99B4CCD681FA0E7149E1C60CD034E71B080AE5F6043F51A40C0BF376D052D7940681289FD4447184D2B44BE78BC10346F24E69310F61960C7098B8D95DF57FF6BA9B85081DEF0C1";
        }
Esempio n. 4
0
        /// <summary>
        /// 更新价格
        /// </summary>
        /// <param name="item"></param>
        /// <param name="http"></param>
        /// <returns></returns>
        public string UpdatePrice(GetWebPageDate.Http.HttpRequest http, decimal price, string storeid, string tag, string stock)
        {
            string param = "business_item=&course=&mall_price={3}&market_price={0}&open_close=2&promotion={1}&storeid={2}&stock={4}";

            string inventory = !string.IsNullOrEmpty(tag) && tag == "201" ? stock : random.Next(30, 40).ToString();

            string postStr = string.Format(param, price, tag, storeid, price, inventory);

            string updateUrl = "https://admin.tkyfw.com/Goods/do_editGoods";

            string info = http.HttpPost(updateUrl, postStr);

            return(info);
        }
Esempio n. 5
0
        //username:hankang
        //pass:15111193057xh
        //verify:
        //viewlicense:1
        /// <summary>
        /// 登录
        /// </summary>
        /// <returns></returns>
        public CookieContainer Login()
        {
            try
            {
                string postDataStr = string.Format("store_name={0}&username={1}&pass={2}&verify=&viewlicense=1", HttpUtility.UrlEncode(store_name), user_name, pass);

                GetWebPageDate.Http.HttpRequest http = new GetWebPageDate.Http.HttpRequest();

                CookieContainer cookies = new CookieContainer();

                byte[] postData = Encoding.UTF8.GetBytes(postDataStr);

                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(login_url);
                ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);
                request.ProtocolVersion = HttpVersion.Version11;
                // 这里设置了协议类型。
                ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;// SecurityProtocolType.Tls1.2;
                request.Method        = "POST";
                request.KeepAlive     = false;
                request.Timeout       = 1000000;
                request.ContentType   = "application/x-www-form-urlencoded; charset=UTF-8";
                request.Referer       = "https://admin.tkyfw.com/Seller_login.html";
                request.ContentLength = postData.Length;
                request.UserAgent     = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)";
                //cookie.SetCookies(request.RequestUri, "Qs_lvt_150743=1500685870%2C1500777689; NTKF_T2D_CLIENTID=guestBC81D14C-3099-FCD9-FE94-67D92C0B496A; Hm_lvt_ed70f863f631ecaac146592025767ed8=1500685870; Qs_pv_150743=1447053609678541000%2C3007060151905128000%2C355027317986517250%2C1201566385246198500%2C3405144643715530000; Hm_lvt_3ad2c5e8712b25159b989a93a9927632=1500685895; acw_tc=AQAAAIyCqm27gAQABUULt6WUgM5Ca2iH; PHPSESSID=1sighr4l5nqe1dj4536u1mh2v3; __guid=202919361.837275310285311200.1509859920993.7488; renren_tag_0526=isTag; sellerCooke=think%3A%7B%22sellerName%22%3A%22hankang%22%2C%22sellerStoreName%22%3A%22%25E9%2595%25BF%25E6%25B2%2599%25E5%258E%25BF001%25E5%25BA%2597%22%7D; Hm_lvt_7203bc79de07054ef3770e27e8ca9068=1509860118; Hm_lpvt_7203bc79de07054ef3770e27e8ca9068=1509860118; monitor_count=3");
                request.CookieContainer = new CookieContainer();
                Stream myRequestStream = request.GetRequestStream();
                myRequestStream.Write(postData, 0, postData.Length);
                myRequestStream.Close();

                HttpWebResponse response = (HttpWebResponse)request.GetResponse();

                //response.Cookies = cookie.GetCookies(response.ResponseUri);

                Stream myResponseStream = response.GetResponseStream();
                cookies.Add(response.Cookies);
                StreamReader myStreamReader = new StreamReader(myResponseStream, Encoding.GetEncoding("utf-8"));
                string       retString      = myStreamReader.ReadToEnd();

                myStreamReader.Close();
                myResponseStream.Close();
                return(cookies);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                return(Login());
            }
        }
Esempio n. 6
0
        /// <summary>
        /// 获取下架列表
        /// </summary>
        /// <param name="cookie"></param>
        /// <returns></returns>
        public bool GetDownListItem(CookieCollection cookie)
        {
            GetWebPageDate.Http.HttpRequest http = new GetWebPageDate.Http.HttpRequest();

            string url = "https://admin.tkyfw.com/Goods/throughAudit?/Goods/throughAudit=&status=1&state=2";

            http.Cookie = "acw_tc=AQAAAMj+8lkEeQUA3eT4OlKCFpqJmk95; Qs_lvt_150743=1509785002%2C1510643909; PHPSESSID=0cv28td420q4ii7ult49qm4111; sellerCooke=think%3A%7B%22sellerName%22%3A%22hankang%22%2C%22sellerStoreName%22%3A%22%25E9%2595%25BF%25E6%25B2%2599%25E5%258E%25BF001%25E5%25BA%2597%22%7D; Qs_pv_150743=3457133030228596700%2C2642740307105821700%2C2882295116553261000%2C1172614365052146400%2C979891720064693100; Hm_lvt_ed70f863f631ecaac146592025767ed8=1509785002,1510643909; Hm_lpvt_ed70f863f631ecaac146592025767ed8=1510645265; nTalk_CACHE_DATA={uid:kf_9335_ISME9754_guestTEMP1758-0E75-6A,tid:1510643909116098}; NTKF_T2D_CLIENTID=guestTEMP1758-0E75-6A74-9EB9-8632DF7CEB19; Hm_lvt_3ad2c5e8712b25159b989a93a9927632=1510644101; Hm_lpvt_3ad2c5e8712b25159b989a93a9927632=1510645266; Hm_lvt_7203bc79de07054ef3770e27e8ca9068=1509780503,1509934350,1510060776,1510543588; Hm_lpvt_7203bc79de07054ef3770e27e8ca9068=1510647168";

            string content = http.HttpGet(url);

            string itemStr = CommonFun.GetValue(content, "<form name=\"form\" method=\"post\">", "</form>");

            MatchCollection ms = CommonFun.GetValues(itemStr, "<div class=\"white-box table-box\">", "<div class=\"span2 operationone\">");

            foreach (Match m in ms)
            {
                CommonFun.WriteCSV("TKAdmin/down.csv", GetOneItem(m.Value));
            }

            string pageStr = CommonFun.GetValue(content, "<div><li><span>", "\"><span>末页</span>");

            pageStr = pageStr.Substring(pageStr.LastIndexOf("=") + 1);

            int totalPage = 0;

            if (!string.IsNullOrEmpty(pageStr))
            {
                totalPage = Convert.ToInt32(pageStr);
            }

            for (int i = 2; i <= totalPage; i++)
            {
                content = http.HttpGet(url + "&p=" + i);

                itemStr = CommonFun.GetValue(content, "<form name=\"form\" method=\"post\">", "</form>");

                ms = CommonFun.GetValues(itemStr, "<div class=\"white-box table-box\">", "<div class=\"span2 operationone\">");

                foreach (Match m in ms)
                {
                    CommonFun.WriteCSV("TKAdmin/down.csv", GetOneItem(m.Value));
                }

                Console.WriteLine("{2}:totalPage:{0}, curPage:{1}", totalPage, i, DateTime.Now);
            }

            return(true);
        }
Esempio n. 7
0
        /// <summary>
        /// 获取所有在售物品
        /// </summary>
        /// <returns></returns>
        public bool ReadeAllSellingItme()
        {
            GetWebPageDate.Http.HttpRequest http = new GetWebPageDate.Http.HttpRequest();

            http.CookieContainer = Login();

            // http.Cookie = "acw_tc=AQAAAMj+8lkEeQUA3eT4OlKCFpqJmk95; Hm_lvt_3ad2c5e8712b25159b989a93a9927632=1510644101; Hm_lpvt_3ad2c5e8712b25159b989a93a9927632=1510645266; PHPSESSID=dem5mqnu6bfibviglvjh9d4ud1; Qs_lvt_150743=1509785002%2C1510643909%2C1510747212; nTalk_CACHE_DATA={uid:kf_9335_ISME9754_guestTEMP1758-0E75-6A,tid:1510643909116098}; NTKF_T2D_CLIENTID=guestTEMP1758-0E75-6A74-9EB9-8632DF7CEB19; Qs_pv_150743=2882295116553261000%2C1172614365052146400%2C979891720064693100%2C1505959923634373400%2C662315226244183900; Hm_lvt_ed70f863f631ecaac146592025767ed8=1509785002,1510643909; Hm_lpvt_ed70f863f631ecaac146592025767ed8=1510747235; sellerCooke=think%3A%7B%22sellerName%22%3A%22hankang%22%2C%22sellerStoreName%22%3A%22%25E9%2595%25BF%25E6%25B2%2599%25E5%258E%25BF001%25E5%25BA%2597%22%7D; Hm_lvt_7203bc79de07054ef3770e27e8ca9068=1509780503,1509934350,1510060776,1510543588; Hm_lpvt_7203bc79de07054ef3770e27e8ca9068=1510747284";

            string content = http.HttpGet("https://admin.tkyfw.com/Goods/throughAudit?/Goods/throughAudit=&status=1&state=1");

            string itemStr = CommonFun.GetValue(content, "<form name=\"form\" method=\"post\">", "</form>");

            UpdateAllSellingItemPrice(itemStr, http);

            string pageStr = CommonFun.GetValue(content, "下一页", "><span>末页</span>");

            pageStr = CommonFun.GetValue(pageStr, "&p=", "\"");

            pageStr = pageStr.Substring(pageStr.LastIndexOf("=") + 1);

            int totalPage = 0;

            if (!string.IsNullOrEmpty(pageStr))
            {
                totalPage = Convert.ToInt32(pageStr);
            }

            for (int i = 2; i <= totalPage; i++)
            {
                if (i % 200 == 0)
                {
                    http.CookieContainer = Login();
                }

                content = http.HttpGet("https://admin.tkyfw.com/Goods/throughAudit?/Goods/throughAudit=&status=1&state=1&p=" + i);

                itemStr = CommonFun.GetValue(content, "<form name=\"form\" method=\"post\">", "</form>");

                UpdateAllSellingItemPrice(itemStr, http);

                Console.WriteLine("{2}:totalPage:{0}, curPage:{1}", totalPage, i, DateTime.Now);
            }

            return(true);
        }
Esempio n. 8
0
        public string Login(string url, string postDataStr, Dictionary <string, string> heads = null)
        {
            try
            {
                GetWebPageDate.Http.HttpRequest http = new GetWebPageDate.Http.HttpRequest();

                CookieContainer cookies = new CookieContainer();

                byte[] postData = Encoding.UTF8.GetBytes(postDataStr);

                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
                //ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);
                //request.ProtocolVersion = HttpVersion.Version11;
                // 这里设置了协议类型。
                //ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;// SecurityProtocolType.Tls1.2;
                // request.Headers.Remove(HttpRequestHeader.Connection);
                request.Headers.Add(HttpRequestHeader.KeepAlive, "TRUE");
                request.Method    = "POST";
                request.KeepAlive = true;
                request.Timeout   = 1000000;
                // request.Connection = "keep-alive";
                request.ContentType   = "application/x-www-form-urlencoded; charset=UTF-8";
                request.Referer       = "https://reg.yaofangwang.com/login.aspx";
                request.ContentLength = postData.Length;
                //request.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)";
                request.UserAgent       = "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36";
                request.CookieContainer = cookies;

                AddHeads(heads, request);

                //                __jsluid=461a853c4fabb30826b6e52419570ef1
                //    UM_distinctid=1671133d9f429-07f92019831a7a-5c11301c-1fa400-1671133d9f56
                //    HistoryMedicine=9154300|6231990|3825429|3954845|11906090|3985362|4037712
                //    real_ip=219.137.142.51
                //    Hm_lvt_e5f454eb1aa8e839f8845470af4667eb=1546673024
                //    hotkeywords=%E8%A1%A5%E8%A1%80%23%231%23%23wwwsearch%23%23%24%23%23search.html%23%23keyword%3D%25e8%25a1%25a5%25e8%25a1%2580%40%40999%23%230%23%23other_https%3A%2F%2Fwww.yaofangwang.com%2Fsearch%2F13791.html%40%40%E7%89%87%E4%BB%94%E7%99%80%23%230%23%23other_https%3A%2F%2Fwww.yaofangwang.com%2Fsearch%2F39735.html%40%40%E5%A6%88%E5%AF%8C%E9%9A%86%23%230%23%23wwwsearch%23%23%24%23%23search.html%23%23keyword%3D%25e5%25a6%2588%25e5%25af%258c%25e9%259a%2586%40%40%E9%98%BF%E8%83%B6%23%231%23%23other_https%3A%2F%2Fwww.yaofangwang.com%2Fsearch%2F11442.html%40%40%E9%87%91%E6%88%88%23%230%23%23other_https%3A%2F%2Fwww.yaofangwang.com%2Fsearch%2F30642.html%40%40%E6%B1%A4%E8%87%A3%E5%80%8D%E5%81%A5%23%230%23%23other_https%3A%2F%2Fwww.yaofangwang.com%2Fsearch%2F50493.html
                //    __RequestVerificationToken=Z_ElEcjuJBuCSy5ZIUdQZPQ92GYVe-XsFmlRsGRwgXxIlslu8OC6dGAzJ5iEt7X4v4eMHCLmd__DYWFqHixzk_Zpoc8cGlWJkMBwtCqDxzs1
                //    ASP.NET_SessionId=dbqivtdhkd3n2o1frxyb4f3t
                //    historysearch=
                //    logined_username=BSK777
                //    CNZZDATA1261831897=1407370989-1546668388-https%253A%252F%252Fwww.yaofangwang.com%252F%7C1546679190
                //    Hm_lpvt_e5f454eb1aa8e839f8845470af4667eb=1546681425
                //                Response sent 94 bytes of Cookie data:
                //    Set-Cookie: real_ip=219.137.142.51; domain=.yaofangwang.com; expires=Sat, 05-Jan-2019 10:43:43 GMT; path=/

                //Response sent 99 bytes of Cookie data:
                //    Set-Cookie: ASP.NET_SessionId=dbqivtdhkd3n2o1frxyb4f3t; domain=/; expires=Fri, 04-Jan-2019 09:43:43 GMT; path=/

                //This response did not contain a P3P Header.

                //Validate P3P Policies at: http://www.w3.org/P3P/validator.html
                //Learn more at: http://fiddler2.com/r/?p3pinfo
                Stream myRequestStream = request.GetRequestStream();
                myRequestStream.Write(postData, 0, postData.Length);
                myRequestStream.Close();

                HttpWebResponse response = (HttpWebResponse)request.GetResponse();

                Stream myResponseStream = response.GetResponseStream();
                //cookies.Add(response.Cookies);
                StreamReader myStreamReader = new StreamReader(myResponseStream, Encoding.GetEncoding("utf-8"));
                string       retString      = myStreamReader.ReadToEnd();

                myStreamReader.Close();
                myResponseStream.Close();
                cookieContainer = cookies;

                return(retString);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }

            return(null);
        }