필터 지우기
필터 지우기

How do I open a website in a browser, enter login data and get the resulting page content automatically?

조회 수: 19 (최근 30일)
I have seen that there is this 'webwrite' function. But I do not know how to get the correct labels of the login boxes and how to enter strings there. Is there a different function for this?

답변 (1개)

Dasharath Gulvady
Dasharath Gulvady 2015년 10월 2일
편집: Dasharath Gulvady 2015년 10월 2일
If you are web service requires authentication, you can pass the username and password using weboptions with webwrite:
  댓글 수: 1
Gunn711
Gunn711 2015년 10월 2일
편집: Gunn711 2015년 10월 2일
I did this:
url = 'http://www.myurl.com';
options = {'Username', 'myUsername', 'Password', 'myPassword', 'Timeout', 10};
z = webwrite(url, options);
What I get in z is just the source code of the login page. Do I have to use the URL of the login page or can I use the URL I want to go to after login? How would I get that content, when I have to use the login URL? Do I have to do something with a cookie? Could it be that the website which I try to login do not support RESTful API? How can I find out?

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

카테고리

Help CenterFile Exchange에서 Web Services에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by