【问题标题】:Rendering content inside an iframe is not working in a Jupyter Hub Notebook在 iframe 中渲染内容在 Jupyter Hub Notebook 中不起作用
【发布时间】:2020-05-08 05:35:04
【问题描述】:

我有一个在本地运行的网络服务器。当我在笔记本中使用 localhost:portNumber url 执行 wget 时。下载 html 文件似乎可以正常工作。

但是当我尝试在 iframe 中渲染它时。我得到空白数据,如下图所示。 试图弄清楚发生了什么。它甚至没有显示任何异常。 :(

【问题讨论】:

    标签: jupyter-notebook jupyter jupyter-lab jupyter-console


    【解决方案1】:

    看来您的方法应该可行。另一种方法是将其保存到文件中,然后在 iframe 中显示(使用 curl,因为我在 Windows 上):

    ! curl localhost:8080/index.html > ifile.html
    

    然后:

    %%html
    <iframe src='ifile.html' width=200 height=200></iframe>
    

    【讨论】:

      猜你喜欢
      • 2017-10-15
      • 1970-01-01
      • 2017-06-12
      • 1970-01-01
      • 1970-01-01
      • 2018-02-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多