How can I save the content of the MATLAB web browser window programmatically? Not the same as WEBREAD....
8 Ansichten (letzte 30 Tage)
I am using R2015b on a 64bit Mac running El Capitan.
I have a very specific reason for needing to be able to programmatically save the page source code of a webpage displayed in a MATLAB web browser window. WEBREAD does not work for this specific purpose. Already tested this extensively. Already ruled it out. I am looking for a workaround that draws directly from the browser window and its associated data.
For instance, I know that I can right-click on the MATLAB web browser window and choose "Save As" or "Page Source" to get what I need, but I would like to do this programmatically within MATLAB, not by mouse-click.
Any help would be greatly appreciated.
Dave Behera am 4 Apr. 2016
Bearbeitet: Dave Behera am 10 Aug. 2016
Are you launching the MATLAB web browser with the 'web' command? http://www.mathworks.com/help/matlab/ref/web.html#inputarg_url
If yes, do this:
[a, h] = web('http://google.com')
CurrentLocation= get(h, 'CurrentLocation') % Gives you location of current page
htmlText = get(h, 'HtmlText') % Gives you html content of current page