Пример #1
0
        public string get_shareId(int fid)
        {
            //fid = "11769053";
            var            lanz = "https://pc.woozooo.com/doupload.php";
            HttpWebRequest req  = (HttpWebRequest)WebRequest.Create(lanz);

            req.CookieContainer = cookieBag;
            //req.UserAgent = phoneUserAgent;
            var data = new Dictionary <string, string>();

            data["task"]    = "22";
            data["file_id"] = fid.ToString();
            var retJson = Newtonsoft.Json.Linq.JObject.Parse(Example_Work.Post(req, data));

            if (retJson["zt"].ToObject <int>() != 1)
            {
                return(null);
            }
            return(retJson["info"]["f_id"].ToString());
        }
Пример #2
0
        public bool login(string name, string password)
        {
            var loginUrl = "https://pc.woozooo.com/account.php";
            var data     = new Dictionary <string, string>();

            data["action"]   = "login";
            data["task"]     = "login";
            data["ref"]      = "https://up.woozooo.com/";
            data["formhash"] = "0af1aa15";
            data["username"] = "******";
            data["password"] = "******";
            HttpWebRequest req = (HttpWebRequest)WebRequest.Create(loginUrl);

            req.CookieContainer = cookieBag;
            var hdoc = Example_Work.Post(req, data);

            isLogin = hdoc.Contains("登录成功");

            HttpClientHandler hander = new HttpClientHandler()
            {
                CookieContainer   = cookieBag,
                AllowAutoRedirect = true,
                UseCookies        = true
            };

            _hc = new HttpClient(hander);
            return(isLogin);

            //var hr = (HttpWebRequest)WebRequest.Create(loginUrl);
            //hr.Referer = "https://www.lanzous.com";
            //hr.Headers.Add(HttpRequestHeader.AcceptLanguage, "zh-cn,en-us;q=0.5");
            //hr.UserAgent = phoneUserAgent;
            //hr

            //var fid = "i5ydxrc";
            //var lanz = "https://www.lanzous.com/tp/";
        }