How to use matlab to input/output specific words into/from the specific webpage?

2 ビュー (過去 30 日間)
Zhuoqun Zhang
Zhuoqun Zhang 2016 年 8 月 29 日
コメント済み: Sean de Wolski 2016 年 8 月 31 日
Hello, I am doing some online surveys. Instead of doing that manually and repetitively, I want to write a code to do that for me. To achieve that, I need to: 1. open the specific webpage (I think I can do that with "system" or "web" commands.); 2. fill some blanks with pre-defined words; 3. collect some useful data and store them in to the work-space. (The "urlread" command generates too much data. I only want to collect several specific numbers at the same position of the webpage each time.)
Can Matlab achieve that? If not, what kind of software should I use? Thanks in advance!
  1 件のコメント
Sean de Wolski
Sean de Wolski 2016 年 8 月 31 日
If it's in the same position every time, then a regular expression should be able to capture it. Do you have a small example? If not, look at
doc regexp

サインインしてコメントする。

回答 (1 件)

Shruti Shivaramakrishnan
Shruti Shivaramakrishnan 2016 年 8 月 31 日
Currently, MATLAB has a function called "webread" apart from "urlread" that can be used to collect information from the webpages. The web service provides a RESTful API that returns data formatted as an internet media type such as JSON, XML, image, or text. You could parse through that information to collect the data needed. Refer to this link for more information on the "webread" command.

カテゴリ

Help Center および File ExchangeJSON Format についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by