本文介绍了C#如何下载使用ajax加载的html的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如今,有一些网页是使用一些基于ajax的框架(动态或延迟加载)开发的.我只是想知道是否有任何方法可以下载此类页面的html内容,例如当我尝试使用htmlAgilityPack下载时,但我得到的只是标题和空主体部分,但是当我尝试检查元素时,只有我可以看到正确的htmls/div,当我尝试查看视图源页面时,我看到空的身体...

now a days there are web pages which developed using some ajax based frameworks (dynamically or lazy loading). Just wondering if there is any way to download html contents of such pages as when i try to download using htmlAgilityPack but all i get is header and empty body part but when i try to inspect element then only i can see proper htmls/div but of that page when i try to look into view source i see empty body...

是否有任何类似htmlAgilityPack的第三方或其他任何方式?

is there any third party like htmlAgilityPack or any other way?

推荐答案

您可以看到它.通过HTML Agility Pack获取Web内容. https://code.msdn.microsoft.com/Getting-web-content-by-bb07d17d ...

You can see it.Getting web content by Html Agility Pack.https://code.msdn.microsoft.com/Getting-web-content-by-bb07d17d...

这篇关于C#如何下载使用ajax加载的html的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-15 09:55