【问题标题】:get webpage html and css code from Matlab从 Matlab 获取网页 html 和 css 代码
【发布时间】:2014-02-26 01:19:50
【问题描述】:

我想使用 Matlab 获取完整的网页代码,但函数 urlread 只返回 html 代码。是否有任何解决方案可以获取整页代码,就像我在浏览器中使用“另存为”下载它一样?

谢谢。

【问题讨论】:

  • 你想得到什么?资产?
  • 什么平台(MS Windows|Linux)?
  • 我想获取页面的 html、css 和 javascript 代码,但 urlread 只提供 html。如果我在浏览器中选择“另存为”选项,我可以得到这个,但不知道如何从 Matlab 中做到这一点。也许还有其他一些选择。

标签: html css matlab


【解决方案1】:

在 MS Windows 上,您可以使用

ie = actxserver('internetexplorer.application')
ie.Navigate('http://sample.com/mydocument.html')
ie.ExecWB(4,2,'foo.html')

有关 ExecWB() 的说明,请参阅 saving-a-web-page-from-ie-using-powershell。 您可能无法摆脱提示,因此没有自动化。

【讨论】:

    猜你喜欢
    • 2012-10-13
    • 1970-01-01
    • 1970-01-01
    • 2011-10-14
    • 2012-02-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多