Filter löschen
Filter löschen

How can I get data from a website?

10 Ansichten (letzte 30 Tage)
Albert Añaños
Albert Añaños am 20 Feb. 2020
Beantwortet: Albert Añaños am 24 Feb. 2020
Hi, I am trying to read financial data from pages like this one:
I think it's not a RESTful site (probably uses javascript), so webread does not work here.
I have also tried urlfilter, but it misses the dates.
Is there an easy way to get that type of data into MATLAB? Thanks!

Akzeptierte Antwort

Albert Añaños
Albert Añaños am 24 Feb. 2020
Thank Jalaj!
I followed the examples and found a quick way to do this:
url_string = ('');
nr_table = 1;
out_table = getTableFromWeb_mod(url_string, nr_table);
The function getTableFromWeb_mod simplifies all the complexity of using regexp, multiple tables in the page, etc.

Weitere Antworten (1)

Jalaj Gambhir
Jalaj Gambhir am 24 Feb. 2020
You can use a combination of webread and regexp, to extract the required table (in this case, has class = "genTbl closedTbl historicalTbl"). You can refer to examples here.




Community Treasure Hunt

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

Start Hunting!

Translated by