weixin_33696822 2012-06-20 09:53 采纳率: 0%
浏览 46

HTMLUnit Axaj文件下载

I'm trying to download the XLS file from this page: http://www.nordpoolspot.com/Market-data1/Elspot/Area-Prices/ALL1/Hourly/ (click on "Export to XLS" link).

However doing:

page.getAnchorByText("Export to XLS").click().getWebResponse().getContentAsStream();

returns the html of the web page, instead of the expected file.

Do you have any suggestion?

I already tried the 3 points here http://htmlunit.sourceforge.net/faq.html#AJAXDoesNotWork without success.

  • 写回答

1条回答 默认 最新

  • weixin_33738578 2012-06-20 10:01
    关注

    The following:

    webClient = new WebClient(BrowserVersion.FIREFOX_3_6);
    

    fixed my issue.

    评论

报告相同问题?

悬赏问题

  • ¥50 如何增强飞上天的树莓派的热点信号强度,以使得笔记本可以在地面实现远程桌面连接
  • ¥15 MCNP里如何定义多个源?
  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services