1.cefsharp浏览器访问iqiyi.com异常 (403 Forbidden)
403 Forbidden
Q_DENY: Forbidden by iQIYI WAF! Any problem, contact iQIYI Security Group (security-help). Request ID: c0597b5aeead125907f7
2.解决办法(2种)
- 1)屏蔽掉 cefSettings.UserAgent
- 2)修改 cefSettings.UserAgent = “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0”;
说明根据浏览器的不同,UserAgent可能不太一样。
Edge浏览器的UserAgent 为 (edge的版本是128的)