There is a component CppWebBrowser
. How to get the source code of the current page from it?
- Has anyone come across this problem? - Crasher
2 answers
Based on this example, I browserInstance->Document
ready to assume that it is necessary to manipulate the browserInstance->Document
field.
It seems to me that this field is the essence of some class of type HTMLDocument
, or maybe it simulates a similar interface. Further pull out the page should be fairly trivial.
I'm not sure that this is absolutely correct, because there is neither CppBuilder
, nor documentation on CppWebBrowser
at hand, but I think I’m thinking in the right direction.
- Thank you very much for the answer in principle, I thought so, but the problem is that browserInstance-> Document returns the _di_ispatch class variable - and how to translate it into a regular line is not known. Googled - no result - Crasher
I decided to answer my old question :)
In general, no perversion with browserInstance->Document
will give the desired result, it will not work out completely to go through the path to the source code unnoticed by the user. The best way out is get/post
requests to the site. It is easy (but unstable) to send them using the IdHTTP
( Indy Client
) component, or you can write your own connection and send algorithm.
Sometimes it "seems" that it is impossible to get the page by request, for example on the cgi
page. But, as personal experience has shown, anything is possible.