1

我尝试 使用 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 处理出现的页面?

谢谢!!

4

2 回答 2

0

我自己解决了。这是我必须调用的解决方案链接,其中“auctionReultListIndex”后面的数字描述了我想查看的列表中的哪个出价:

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

所以 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-30T09:49:57.223 回答
0

不幸的是,Matlab 自己无法做到这一点。在您的上下文中,Matlab 只是一个客户端,它使用urlread. 没有一个urlclickhereurldothisaction函数这样的东西......

使用 Matlab 的唯一选择是根据主页上的可用信息构建与按钮关联的 URL,然后urlread再次调用。

如果您没有使用 Matlab,Sikuli是一个有趣的 Jython 项目,在这里可能会有所帮助。

于 2015-03-23T17:38:44.160 回答