urlread vs. view source - need view source data

I am trying to use Matlab to grab some data from a website and have hit a dead end. When looking at the 'view source' in my web browser, I can see the data clearly. However, when I utilize the built-in Matlab function 'urlread' it only seems to retrieve the static portions of the webpage.
I'm assuming the webpage uses java and dynamically updates? Is there a way to have Matlab create a static image of the webpage to permit data gathering? Is there a better way? If so, would you please provide examples.
So frustrating 'view source' shows the data right there ... Thanks!

3 件のコメント

Guillaume
Guillaume 2014 年 11 月 3 日
Can you share the url in question, if it's accessible?
Michael
Michael 2014 年 11 月 3 日
編集済み: Michael 2014 年 11 月 3 日
See the question marks (?) next Composite Rating for example. When I am logged in via my web browser, I see values (I have an account.) However, when I try to retrieve via urlread it shows the question marks. Is there a way to log in via Matlab before using urlread?
Christian Præstegaard Sørensen
Christian Præstegaard Sørensen 2016 年 6 月 17 日
Hi Michael, Did you find a solution to the problem? I have similar issues... /Christian

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

回答 (3 件)

Guillaume
Guillaume 2014 年 11 月 3 日

0 投票

Use webread with a weboptions object containing your username and password:
webread('http://research.investors.com/quotes/nasdaq-apple-inc-aapl.htm', weboptions('Username', 'xxx', 'Password', 'yyy'))
buer
buer 2014 年 12 月 1 日

0 投票

Hi Guillaume,
I am using Matlab 2013b. does nto have the function weboptions.....do you know how can I perform authentication with this version? Thanks.

1 件のコメント

Guillaume
Guillaume 2014 年 12 月 1 日
To get more visibility to your question, you would be better off starting a new question of your own rather than highjacking somebody's else.
Please do so.

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

タグ

質問済み:

2014 年 11 月 3 日

Community Treasure Hunt

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

Start Hunting!

Translated by