Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/google-app-engine/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何访问嵌入式openload iframe_Javascript_Jquery_Iframe_Google Chrome Extension - Fatal编程技术网

Javascript 如何访问嵌入式openload iframe

Javascript 如何访问嵌入式openload iframe,javascript,jquery,iframe,google-chrome-extension,Javascript,Jquery,Iframe,Google Chrome Extension,我正在尝试从嵌入式openload链接(示例:)获取直接下载链接。结果可能如下所示:。如果导航到嵌入链接并运行 document.querySelector("#mediaspace_wrapper > div:last-child > p:last-child") 从开发人员控制台返回流链接的基本数据。当我试图在我的私人网站上的嵌入式视频上实现这一点时,我得到了一个跨站点脚本的错误,这是可以理解的 <!DOCTYPE html> <html> <h

我正在尝试从嵌入式openload链接(示例:)获取直接下载链接。结果可能如下所示:。如果导航到嵌入链接并运行

document.querySelector("#mediaspace_wrapper > div:last-child > p:last-child")
从开发人员控制台返回流链接的基本数据。当我试图在我的私人网站上的嵌入式视频上实现这一点时,我得到了一个跨站点脚本的错误,这是可以理解的

<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Proflix</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>

<body>
    <iframe id="video" src="https://openload.co/embed/CoKeagPRpQg/" scrolling="no" frameborder="0" width="700" height="430" allowfullscreen="true"
        webkitallowfullscreen="true" mozallowfullscreen="true">
    </iframe>
</body>

</html>

Proflix
然而,我偶然发现了chrome扩展,仅使用JavaScript就可以进入iframe()。这真让我困惑。我联系了开发人员,他告诉我他的扩展基于脚本。但它在开发人员控制台上不起作用。我的问题是:在本例中,JavaScript如何输入外部iframe,以及如何复制它

相关的:


扩展直接在iframe内部运行。它不“输入”iframe。所以我可以用纯JavaScript复制它,还是只对chrome扩展有效?内容脚本是一种扩展。它仍然是纯JS。很抱歉,我对chrome扩展不是很熟悉。简言之:在没有安装扩展的情况下,我是否可以在我的网页上使用此扩展的功能?否,只有扩展可以运行内容脚本。