【问题标题】:How do I get this code for python.display to python.display Iframe on repl?如何在 repl 上获取 python.display 到 python.display Iframe 的此代码?
【发布时间】:2019-11-01 17:17:07
【问题描述】:

Repl 不断给我这个:

/home/runner/.local/share/virtualenvs/python3/lib/python3.7/site-packages/IPython/core/display.py:701: 用户警告:考虑改用 IPython.display.IFrame
warnings.warn("考虑改用 IPython.display.IFrame")

如何解决这个问题

from IPython.display import HTML

# Youtube
HTML('<iframe width="760" height="515" src="https://www.youtube.com/embed/7EqhK3L1Yio?autoplay=1-1 rel=0&amp;controls=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>') #

【问题讨论】:

    标签: python video


    【解决方案1】:

    您应该使用 IFrame 而不是 HTML。例如:

    from IPython.display import IFrame
    
    IFrame(src='src', width='width', height='height')
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-05-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-04-08
      • 2021-12-20
      相关资源
      最近更新 更多