1

this is a website with a live timing table:

http://www.apex-timing.com/live-timing/lemans-karting/index.html

Do you guys know whether the Matlab function urlread lets me read this kind of data?

Using

str = urlread('http://www.apex-timing.com/live-timing/lemans-karting/index.html')

returns a single string with lot of info probably related to the website code but nothing related to what I see on the website.

Cheers,

Sebastian

Sebastian
  • 19
  • 1
  • 5

1 Answers1

1

The website dynamically creates/updates its content using JavaScript. So I think that there is no easy way to read the data you want using Matlab. You would have to look at the script ( http://www.apex-timing.com/live-timing/common/Scripts/jquery-go.js ), unpack it and try to figure out how it works, however this is likely to be difficult and might violate the terms of service of the website.

magnetometer
  • 646
  • 4
  • 12
  • Thanks for your answer magnetometer. I'm thinking about a workaround: suppose I open the url within the matlab browser (wb=com.mathworks.mde.webbrowser.WebBrowser.createBrowser), so I can wait the javascript to connect to the server and show me the times table, as soon as I have all the times within the matlab browser, is there any way to get that HTML data using the wb java component? – Sebastian Sep 09 '14 at 16:29
  • I wasn't aware of the WebBrowser component. You can get a list of the methods with ``wb.components`` . ``wb.getHtmlText`` looked promising for me, but I only got the unchanged contents of the original webpage. However, there might be other methods that are more helpful. Sadly, there doesn't seem to be official documentation on that topic. – magnetometer Sep 09 '14 at 19:03
  • Thanks magnetometer. I've found the solution in using the WebBrowser component and it's wb.getHtmlText method. I was behind a proxy and this didn't let me to use the getHtmlText properly but I then realized that the method works fine without a proxy. Hope this helps others. – Sebastian Oct 16 '14 at 07:58