M
M
Milton8122018-03-27 23:23:41
HTML
Milton812, 2018-03-27 23:23:41

WebClient.DownloadString() gets the incomplete text of the document. How to get full?

Actually the essence of the issue. I can even guess what it is. Part of the document is formed after loading using JavaScript. How to get full text of loaded HTML document?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Kuznetsov, 2018-03-28
@milton812

Here you will need a browser emulator.
You can take, for example, phantomjs - https://stackoverflow.com/questions/32531881/retri...
You can try to work through CefSharp.
Either way, you'll need a JS function that fires on the page load event and checks to see if the page has been rendered. This can be done through a stupid timeout or monitor whether a particular element has appeared.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question