urlread Won't Work for Specific Webpage
6 次查看(过去 30 天)
显示 更早的评论
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 个评论
Marc Jakobi
2015-11-13
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.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Web Services 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!