How to get data from a website
2 次查看(过去 30 天)
显示 更早的评论
Hi all,
I need to get "Ongoing charge" data (0,11%) from this url:
How can I do it? I tried using webread function but I didn't find the information. Thanks to all!
Regards
0 个评论
采纳的回答
Rik
2020-12-18
I can't tell you what you did wrong, because you decided not to post what you have tried. That meant I had to write your code from scratch. I resisted the urge to extract a different parameter and let you modify the code to get to the proper result.
x=webread('https://markets.ft.com/data/funds/tearsheet/summary?s=LU0323048693:EUR');
pat='<th>Ongoing charge</th>';
ind1=strfind(x,pat);ind1=ind1(1)+numel(pat);
ind2=strfind(x,'</td>');ind2(ind2<ind1)=[];ind2=ind2(1);
x((ind1+4):(ind2-1))
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 String Parsing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!