Borrar filtros
Borrar filtros

Trouble using urlread with ESPN MLB standings

1 visualización (últimos 30 días)
Frank Guarinoni
Frank Guarinoni el 22 de Abr. de 2017
Respondida: Nikhil Sreekumar el 25 de Abr. de 2017
I'm trying to use 'urlread' to load MLB standings from ESPN. When I enter urlread('http://proxy.espn.com/mlb/standings?year=2016&month=april'), the url for the April 2016 standings, I get a bunch of code and I can't quite figure out how to separate the data I want from it, that data being the wins, losses, pct, and GB for the NL Central.

Respuestas (1)

Nikhil Sreekumar
Nikhil Sreekumar el 25 de Abr. de 2017
Hi there,
There is a file exchange submission, GET HTML Table Data into MATLAB that might help you out with this scenario.
I just used the code with the above submission as below and was able to get the table:
web('http://proxy.espn.com/mlb/standings?year=2016&month=april');
getTableFromWeb
myTableData = getTableFromWeb(1)
Please provide feedback to the submission in case you have any in the File Exchange page.
Thanks
Nikhil

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by