필터 지우기
필터 지우기

How can I view the source of a webpage using webread

조회 수: 7 (최근 30일)
Christian Præstegaard Sørensen
편집: José-Luis 2016년 6월 28일
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
Christian Præstegaard Sørensen
Hi José-Luis,
I would like to access the data behind the link. Do you know how I could do that?
Guillaume
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
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
Christian Præstegaard Sørensen
편집: Christian Præstegaard Sørensen 2016년 6월 28일
Hi Pavithra,
Sorry, but "webread" is new to me, so I have no idea how to solve my issue.
If I go to a crome-browser and enter "view-source:http://flow.gassco.no/" I can see the text I would like to load into Matlab. Do you have an idea how I can access it from Matlab.
/Christian

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by