How to interact with webpage button

I am trying to grab data from a webpage, but when I go to the url, the first screen requires me to click one of two buttons. After clicking one of them, it then proceeds to the desired page. My question is how can I use webwrite or something else to tell MATLAB to click on one of the buttons.
If I use web(), I can click on the button but I need to do it programically. I can look at the page source of that button page but I'm not familiar enough with what I'm looking at.
Some more info:
When I go to the first url and click the button, this is what the web developer tool returns:
Request URL: https://www......... <url here>
Request Method: POST
Request URL: https://www......... <url here>
Request Method: GET
I think I can use webwrite to pass the HTTP requests, but do I use the POST or GET and do I use those urls in my matlab function?

댓글 수: 3

b
b 2022년 10월 11일
Same question.
A webpage has quiz questions with 4 answers. Unless the user presses 'Send' button (with or without selecting any option for any question), the answers are not revealed.
The answers are revealed, once the user presses the 'send' button. This then appears in page source.
The answer url cannot be read directly by urlread because it doesn't show the answers.
How to simulate the pressing of this 'send' button?
Aldo Sandoval
Aldo Sandoval 2022년 12월 20일
did you guys solve this issue, I am also trying to navigate a website by clicking some buttons.
Anudeep Kumar
Anudeep Kumar 2025년 6월 26일
편집: Anudeep Kumar 2025년 6월 26일

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 Scope Variables and Generate Names에 대해 자세히 알아보기

제품

태그

질문:

2020년 5월 21일

편집:

2025년 6월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by