/// <summary> /// 获取阿里妈妈搜索商品url内容 /// </summary> /// <param name="itemurl"></param> /// <param name="alimamacc"></param> /// <returns></returns> public static string SearchItem(string itemurl, CookieContainer alimamacc) { AlimamaSearchData alimama_searchdata = new AlimamaSearchData(); CookieCollection ccl = alimamacc.GetCookies(new Uri("http://alimama.com")); if (ccl["_tb_token_"] == null) { return("阿里妈妈未登录"); } string tbtoken = ccl["_tb_token_"].Value; string searchurl = "http://pub.alimama.com/items/search.json?queryType=2&q=" + HttpUtility.UrlEncode(itemurl) + "&auctionTag=&perPageSize=40&shopTag=&t=" + HttpHelper1.GetTicks() + "&_tb_token_=" + tbtoken + "&pvid=10_118.145.0.50_464_1484650244904&yxjh=-1"; string refer = "http://pub.alimama.com/promo/search/index.htm?queryType=2&q=" + HttpUtility.UrlEncode(itemurl); string resulthtml = HttpHelper1.SendDataByGET(searchurl, refer, ref alimamacc); //alimama_searchdata = Newtonsoft.Json.JsonConvert.DeserializeObject<AlimamaSearchData>(resulthtml); //string campaignstr = ""; //HttpHelper1.GetStringInTwoKeyword(resulthtml, ref campaignstr, "", "", 0); return(resulthtml); }
public static bool ApplyCampaign(AlimamaSearchData alimama_searchdata) { //alimama_searchdata.Data.PageList[0].TkSpecialCampaignIdRateMap return(true); }