[英]C# Send web request with disabled javascript
I want to download content of one website programatically and it looks like this content is loaded by ajax calls. 我想以编程方式下载一个网站的内容,并且看起来该内容是通过ajax调用加载的。 When I simply disable javascript in my browser, only 1 request is made by this page and all content is loaded without AJAX. 当我仅在浏览器中禁用javascript时,此页面仅发出1个请求,并且所有内容均不使用AJAX加载。
What I need to achieve is to make a web request which will tell web page that I have disabled javascript so it returns me all the content and not just empty body tag with no content at all. 我需要实现的是发出一个Web请求,该请求将告诉网页我已禁用javascript,因此它将返回我所有的内容,而不仅仅是返回没有内容的空body标记。
Any suggestions how to do that? 有什么建议怎么做?
You need to mimic browser. 您需要模仿浏览器。
Steps: 脚步:
http://localhost:8888
) 如果不起作用,请使用Fiddler作为C#代码的代理,将请求的代码与浏览器的代码进行比较(将代理设置为http://localhost:8888
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.