urlread Won't Work for Specific Webpage

I am attempting to scrape a webpage using the urlread() function in MATLAB, though I've run into a problem that I haven't seen before. When I run the code

X = urlread('http://espn.go.com/mens-college-basketball/schedule/_/date/20141114');

I get the error

Error using urlreadwrite (line 92)
The server did not find a resource to match this request.
Error in urlread (line 36)
[s,status] = urlreadwrite(mfilename,catchErrors,url,varargin{:});

When I attempt to visit the link on my browser ( http://espn.go.com/mens-college-basketball/schedule/_/date/20141114 ), I have no problems accessing the page. Does anyone have a solution to this problem? Thanks for the help!

1 Comment

I wasn't able to find a solution, but maybe this info will help you with debugging.
X = webread('http://espn.go.com/mens-college-basketball/schedule/_/date/20141114');
returns the error message
Error using readContentFromWebService (line 37)
The server returned the message: "Not Found" for URL,
'http://espn.go.com/ncb/schedule/' (with HTTP response code 404).
Error in webread (line 115)
[varargout{1:nargout}] = readContentFromWebService(connection,
options);
The line
X = webread('http://espn.go.com/');
works just fine.
So for some reason, the url returns 404 not found to Matlab. No idea why, though.

Sign in to comment.

Answers (0)

Asked:

on 12 Nov 2015

Commented:

on 13 Nov 2015

Community Treasure Hunt

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

Start Hunting!