What's the MatLab WEBSAVE equivalent of this WGET command?

조회 수: 33 (최근 30일)
Serge
Serge 2020년 9월 2일
답변: Serge 2020년 9월 9일
I can't get websave to work (on Win10, R2020a).
What is the MatLab equivilent of this wget command. Note it uses a proxy and authenticaation.
wget --post-data "identity=MYUSER&password=MYPASS&query=PAGEURL" https://AJAXAUTH_URL -e https_proxy=PROXYIP:PORT -O OUTFILE
The above can be broken into two, to reuse the authentication many times. What is the MatLab equivilent here?
wget --save-cookies=COOKIEPATH AUTHURL --post-data "identity=MYUSER&password=MYPASS" -e https_proxy=PROXYIP:PORT -O nul
wget --load-cookies=COOKIEPATH PAGEURL -e https_proxy=PROXYIP:PORT -O OUTFILE
Thank you
  댓글 수: 1
Mohammad Sami
Mohammad Sami 2020년 9월 2일
See if there following answers helps you to get the cookie. https://www.mathworks.com/matlabcentral/answers/307689-sending-session-cookie-with-each-subsequent-http-request-in-matlab

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

채택된 답변

Serge
Serge 2020년 9월 7일
편집: Serge 2020년 9월 7일
Found my own answer to the single command question, need to use webwrite instead of webread.. very counterintuative!
data = webwrite(AUTHURL,'identity',USERNAME,'password',PASSWORD,'query',PAGEURL);
To use proxy: Home > Prefferences > Web

추가 답변 (1개)

Serge
Serge 2020년 9월 9일
This command seems to work for a wegpage but not for download of a file!
data = webwrite(AUTHURL,'identity',USERNAME,'password',PASSWORD,'query',PAGEURL);
To setup proxy goto: Home > Prefferences > Web

카테고리

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

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by