【问题标题】:How to fix an error of website iframe?如何修复网站 iframe 的错误?
【发布时间】:2018-04-03 02:15:52
【问题描述】:

当我访问此网址时:(警告:建议使用一些广告拦截器

https://openload.co/embed/M4pSomdJWME/?c1_file=http://tugaflix.com/legendas/716bac991518958ad95df18200c906c3.srt&c1_label=Legenda

网页链接加载正常,没有错误。

但是,当我尝试在我的 html 代码中通过 iframe 加载同一页面时,出现错误:

我的html代码:

<html>
    <head>
    </head>
    <body>
        <iframe width="600" height="700" 
        src="https://openload.co/embed/M4pSomdJWME/?c1_file=http://tugaflix.com/legendas/716bac991518958ad95df18200c906c3.srt&c1_label=Legenda">
        </iframe>
    </body>
</html>

下图:我的 iframe 中的错误结果。如何解决此类错误?

【问题讨论】:

  • 哦,弹出窗口。这些是我的广告拦截器的一个很好的补充。谢谢。

标签: javascript php html video iframe


【解决方案1】:

如果您愿意设计/编写自己的播放器界面,那么一种加载选项是使用&lt;video&gt; 标签而不是通过&lt;iframe&gt; 标签...

<video width="640" height="480" controls crossorigin="anonymous">
<source src="https://oload.stream/stream/M4pSomdJWME~1508775093~213.205.0.0~IzmpIUe0?mime=true" type="video/mp4">
</video> 

我不会告诉你如何窃取通过代码访问任何视频,但一些建议是:

1) 您可以在源代码中看到服务器1508775191~213.205.0.0 被访问用于媒体文件(包括字幕VTT 文件)。研究其余的源代码。考虑为什么提到token 以及为什么检查referrer。您可以通过什么操作获得相同的访问权限?

2) 通过使用浏览器的开发者工具(尤其是“网络”和“控制台”选项卡),您可以找到相关的 https://oload.stream/stream/ 网址,以便将来进行任何更新或替代嵌入。

PS:

“但是,这个 tugaflix.com/Episodio?E=2310910&S2 网站正在使用那个 iframe”

看源码:http://tugaflix.com/Episodio?E=2310910&S2/
您会看到没有提到或使用 iframe... 他们甚至使用两种不同的播放器界面,因此您不能假设 tugaflix.com 正在加载此页面 https://oload.stream/embed/M4pSomdJWME 在某些 iframe 中.他们改为从名为https://lemonade-fruit.fruithosted.net/的服务器访问 MP4 视频文件

【讨论】:

    【解决方案2】:

    目标网站的代码阻止其显示在 iframe 中。不幸的是,您将无法在 Iframe 中使用该网址。

    【讨论】:

    • 他们可能允许某些域对它们进行 iframe,但不是所有域。
    • @rajdevkumar 我在给定站点中看不到任何 iframe?
    • @FastSnail ,您必须点击查看视频
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-11-17
    • 1970-01-01
    • 2017-07-07
    • 1970-01-01
    • 1970-01-01
    • 2021-11-30
    相关资源
    最近更新 更多