我正在尝试使用url read下载https页面:
str=urlread('https://funds.barclaysstockbrokers.co.uk/clients/bsl/search_factsheet_summary.aspx?code=B0XWN14')
不幸的是,我得到一个错误:
Error downloading URL. Your network connection may be down or your proxy settings improperly configured.我尝试使用urlread2 (http://www.mathworks.co.uk/matlabcentral/fileexchange/35693-urlread2/content/urlread2.m)
但这给了我这个错误:
Response stream is undefined
below is a Java Error dump (truncated):
??? Error using ==> urlread2 at 217
Java exception occurred:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target我该怎么办?
发布于 2015-03-05 09:52:29
下面是我所做的:
http://www.mathworks.com/matlabcentral/answers/39563-managing-public-key-certificates-in-matlab
它涉及到使用Chrome导出证书,然后使用http://portecle.sourceforge.net/将证书添加到Matlab的cacerts文件中
发布于 2012-11-23 08:42:04
这是一个证书安全信任问题。
我在Mathematica中尝试了同样的命令,得到了一个漂亮的弹出窗口,询问我是否要接受证书
str="https://funds.barclaysstockbrokers.co.uk/clients/bsl/search_factsheet_summary.aspx"
Import[str]

当我单击accept for this session时,我得到的数据是OK
我不使用urlread()。但至少现在你知道为什么了。我在urlread中看不到执行上述操作的选项。也许你需要Matlab中的另一个API来做你想做的事情。可能是matlab的一些文件交换可能会处理这个问题。
发布于 2017-03-29 09:47:20
在matlab 2014b之后,您可以使用:
DATA = webread(URL)这个新的API没有urlread命令所具有的所有问题。
https://stackoverflow.com/questions/13520189
复制相似问题