摘要:
添加引用using System.Runtime.InteropServices;声明useragent标志 private string userAgent = "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)";添加API操作[DllImport("urlmon.dll", CharSet = CharSet.Ansi)]private static extern int UrlMkSetSessionOption(int dwOption, string 阅读全文