问题
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...
is there any third party like htmlAgilityPack or any other way?
回答1:
You would need to be able to run the js that is inside. Which according to this answer is not possible with htmlAgilityPack.
回答2:
You can see it.Getting web content by Html Agility Pack.https://code.msdn.microsoft.com/Getting-web-content-by-bb07d17d...
来源:https://stackoverflow.com/questions/31951090/c-sharp-how-to-download-html-which-loads-using-ajax