Exemple #1
0
        public static Image GetImage(string headerImageUrl)
        {
            var reqCookies = new CookieContainer();

            reqCookies = new CookieContainer();
            reqCookies.Add(new Cookie("MM_WX_NOTIFY_STATE", "1", "/", "wx.qq.com"));
            reqCookies.Add(new Cookie("MM_WX_SOUND_STATE", "1", "/", "wx.qq.com"));
            reqCookies.Add(new Cookie("last_wxuin", LoginHelper.LoginPageCookie.wxuin, "/", "wx.qq.com"));
            reqCookies.Add(new Cookie("login_frequency", "1", "/", "wx.qq.com"));
            reqCookies.Add(new Cookie("mm_lang", "zh_CN", "/", "wx.qq.com"));
            reqCookies.Add(new Cookie("pgv_pvi", LoginHelper.pgv_pvi, "/", "wx.qq.com"));
            reqCookies.Add(new Cookie("pgv_si", LoginHelper.pgv_si, "/", "wx.qq.com"));
            reqCookies.Add(new Cookie("webwx_auth_ticket", LoginHelper.LoginPageCookie.webwx_auth_ticket, "/", "wx.qq.com"));
            reqCookies.Add(new Cookie("webwx_data_ticket", LoginHelper.LoginPageCookie.webwx_data_ticket, "/", "wx.qq.com"));
            reqCookies.Add(new Cookie("webwxuvid", LoginHelper.LoginPageCookie.webwxuvid, "/", "wx.qq.com"));
            reqCookies.Add(new Cookie("wxloadtime", CalcTimeUtil.GetUnixDateTime(new TimeSpan(365, 0, 0, 0)), "/", "wx.qq.com"));
            reqCookies.Add(new Cookie("wxsid", LoginHelper.LoginPageCookie.wxsid, "/", "wx.qq.com"));
            reqCookies.Add(new Cookie("wxuin", LoginHelper.LoginPageCookie.wxuin, "/", "wx.qq.com"));
            return(Image.FromStream(WebClientUtil.GetImageOnCookie("https://wx.qq.com" + headerImageUrl, "get", reqCookies)));
        }