添加System.Web.dll引用
添加System.Net.Http引用

using System.Net.Http;
using System.Web;

string key = "电脑"; //拼音diannao也可
string url = string.Format("http://dd.search.jd.com/?ver=2&zip=1&key={0}&t={1}", HttpUtility.UrlPathEncode(key), DateTime.Now.Millisecond);
HttpClient httpClient = new HttpClient();
httpClient.DefaultRequestHeaders.Referrer = new Uri("http://www.jd.com/"); //这个比较重要
string result = httpClient.GetStringAsync(url).Result;
Console.WriteLine(result);

相关文章:

  • 2021-07-30
  • 2021-07-06
  • 2021-12-09
  • 2021-12-09
  • 2021-12-22
  • 2021-08-28
  • 2022-12-23
猜你喜欢
  • 2021-11-28
  • 2022-01-03
  • 2021-10-02
  • 2021-12-09
  • 2021-12-09
  • 2021-12-09
  • 2021-12-09
相关资源
相似解决方案