我试着用Matlab从主页https://www.apg.at/emwebapgrem/AuctionResults.do读取数据。
我已经使用命令筛选了相关的类型和日期。
[str, ~] = urlread(['https://www.apg.at/emwebapgrem/AuctionResults.do?', ...
'auctionType=SECONDARY_CONTROL_POWER', ...
'&periodBegin.date=01.01.2014', ...
'&periodEnd.date=10.01.2014', ...
'&auctionOpenedFrom.date=', ...
'&auctionOpenedTo.date=', ...
'&doFilter=Filtern']);现在,我希望Matlab点击主页上的细节按钮,就在第一次拍卖旁边,并将第一次拍卖的数据作为字符串输出。有什么想法吗?当你点击细节按钮时,如何使Matlab地址显示的页面?
谢谢你!!
发布于 2015-03-30 09:49:57
我自己解决的。这是我必须调用的解决方案链接,“auctionReultListIndex”后面的数字描述了我希望看到的列表中的出价:
所以Maltab代码是:
[str, ~] = urlread(['https://www.apg.at/emwebapgrem/AuctionResults.do?auctionType=SECONDARY_CONTROL_ENERGY&periodBegin.date=02.03.2015&periodEnd.date=03.03.2015&auctionOpenedFrom.date=&auctionOpenedTo.date=&doFilter=Filtern&auctionResultListIndex=0&auctionResultListAction=detail']); 然后,参数str包含一个具有特定出价细节的字符串。
发布于 2015-03-23 17:38:44
不幸的是,Matlab本身无法做到这一点。在您的上下文中,Matlab只是一个客户端,它使用urlread获取URL的内容。不存在urlclickhere或urldothisaction函数.
您使用Matlab的唯一选项是从主页上可用的信息中构建与按钮关联的URL,然后再次调用urlread。
如果您没有使用Matlab绑定,西库利是一个有趣的Jython项目,在这里可能会有所帮助。
https://stackoverflow.com/questions/29215812
复制相似问题