MATLAB: Im having trouble with urlread

urlread

I create a 1×35 matrix with links on each cell. Now im trying to read each of those urls with the command urlread but im getting this message.
Error using urlreadwrite (line 38) Either this URL could not be parsed or the protocol is not supported.
Error in urlread (line 36) [s,status] = urlreadwrite(mfilename,catchErrors,url,varargin{:});
Error in procurarstats (line 18) text6=urlread(text5);
Here is my program:
function text5 = procurarstats()
link=['http://www.dotabuff.com/players/101495620/matches?hero=tiny'];
text=urlread(link);
pattern = '<a class="won" href="/matches/\d*';
text2=regexp(text, pattern, 'match');
text3 = strrep(text2, '<a class="won" href="', 'http://www.dotabuff.com');
[X Y]=size(text3);
for i=1:1:Y
link2=text3(1,i);
text4(1,i)=strcat({'['''},link2,{''']'});
text5=char(text4(1,i));
text6=urlread(text5);
%pattern = 'spectre';
%spectre=regexp(text6, pattern, 'match');
end
Thanks for reading.

Best Answer

Try its replacement: webread(). It's newer so perhaps it works better. Make sure you can get to the link from your browser first.
Related Question