How can I view the source of a webpage using webread
6 次查看(过去 30 天)
显示 更早的评论
Hi,
I am trying to load data from the following webpage http://flow.gassco.no/ by using the following two lines:
URL = 'http://flow.gassco.no/';
out = webread(URL)
However, in the output file (out) I only get a set of the data on the webpage.
Is it somehow possible to load the 'view source' of the webpage to Matlab?
3 个评论
Guillaume
2016-6-28
The main problem is that when you first ask for the page, you get a disclaimer that you must agree to before it updates itself with the data.
So, when matlab requests the page it gets the disclaimer. I don't think that there is a way for webread to agree to that disclaimer (the obvious webread([URL, '?acceptDisclaimer=Accept']) does not work) so I don't think that there is a way for you to download that content from matlab.
回答(1 个)
Pavithra Ashok Kumar
2016-6-27
Hi
From your description, I am assuming you are trying to create a web crawler. In that case, you would have to use "webread" on the links (obtained from the page) to read the data of the .html page. if this is not what you are looking for, could you give a sample input and the corresponding output expected to explain your requirement?
1 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!