/// <summary> /// 获取返回check html的verifysession /// </summary> /// <returns></returns> public static string GetCheckVerifysession(string html) { ZhuaHelper zhuahelper = new ZhuaHelper(html); string verifysession = zhuahelper.GetVerifysession(html); return verifysession; }
/// <summary> /// 获取返回check html的status /// </summary> /// <returns></returns> public static int GetCheckStatus(string html) { ZhuaHelper zhuahelper = new ZhuaHelper(html); int status = int.Parse(zhuahelper.GetInfo("状态码")); return status; }
/// <summary> /// 获取返回check html的默认验证码 /// </summary> /// <param name="html"></param> /// <returns></returns> public static string GetCheckCode(string html) { ZhuaHelper zhuahelper = new ZhuaHelper(html); string status = zhuahelper.GetInfo("默认验证码"); return status; }
/// <summary> /// aid的获取 /// </summary> /// <param name="html">传入的html值</param> /// <returns></returns> public static string GetAid(string html) { ZhuaHelper zhuahelper = new ZhuaHelper(html); string aid=zhuahelper.GetInfo("aid"); return aid; }
public static string TalkAboutFaBiao(string html1) { //获取相关cookies ZhuaHelper zhuahelper = new ZhuaHelper(html1); string supertoken = zhuahelper.GetInfo("supertoken"); //supertoken string superkey = zhuahelper.GetInfo("superkey"); //superkey string skey = zhuahelper.GetInfo("skey"); string uin = "o0343701675"; string pt2gguin = "o0343701675"; string ptui_loginuin="343701675"; string o_cookie="343701675"; string referer = "http://user.qzone.qq.com/343701675?ptsig=" + superkey; //发送cookies IDictionary<string, string> cookies = new Dictionary<string, string>(); cookies.Add("p_skey", superkey); cookies.Add("skey", skey); cookies.Add("pt2gguin", pt2gguin); cookies.Add("uin", uin); cookies.Add("ptui_loginuin", ptui_loginuin); cookies.Add("o_cookie", o_cookie); string formData = string.Format("con={0}&hostuin={1}&ode_version=1&qzreferrer={2}", "qmaaa", "343701675", referer); //HttpHelper httphelper1 = new HttpHelper(cookies); //string html = httphelper1.PostCookiesAndGetHtml("http://user.qzone.qq.com/q/taotao/cgi-bin/emotion_cgi_publish_v6", formData, null, referer, false, Encoding.UTF8); string html; HttpHelperSocket HttpHelperSocket = new HttpHelperSocket(); HttpHelperSocket.GetHtml("user.qzone.qq.com", "q/taotao/cgi-bin/emotion_cgi_publish_v6?g_tk=" + supertoken, 80, "utf-8", "post", formData, out html, cookies, referer); return html; //1887188366 }
/// <summary> /// 获取login_sig /// </summary> /// <param name="html">传入的html值</param> /// <returns></returns> public static string GetLogin_sig() { string html; string host = "ui.ptlogin2.qq.com"; string path = "cgi-bin/login?hide_title_bar=1&low_login=0&qlogin_auto_login=1&no_verifyimg=1&link_target=blank&appid=549000912&style=12&target=self&s_url=http://qzs.qq.com/qzone/v5/loginsucc.html?para=izone&pt_qr_app=�ֻ�QQ�ռ�&pt_qr_link=http://z.qzone.com/download.html&self_regurl=http://qzs.qq.com/qzone/v6/reg/index.html&pt_qr_help_link=http://z.qzone.com/download.html"; HttpHelperSocket HttpHelperSocket = new HttpHelperSocket(); IDictionary<string,string> cookies=new Dictionary<string,string>(); HttpHelperSocket.GetHtml(host, path, 80, "gb2312", "get", "", out html, cookies,""); ZhuaHelper zhuahelper = new ZhuaHelper(html); string login_sig = zhuahelper.GetInfo("login_sig"); return login_sig; }