Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/333.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/69.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
Python 无法加载依赖于通过第三方登录的iFrame源代码_Python_Html_Selenium_Iframe_Webdriver - Fatal编程技术网

Python 无法加载依赖于通过第三方登录的iFrame源代码

Python 无法加载依赖于通过第三方登录的iFrame源代码,python,html,selenium,iframe,webdriver,Python,Html,Selenium,Iframe,Webdriver,我是一个初学者,试图编写一个程序,自动从我的大学网站下载讲座。我目前正在尝试使用SeleniumWebDriver来实现这一点,我已经成功地选择了位于iFrame中的讲座,就像这样 问题是,当我切换到相关的iFrame时,它实际上并没有加载我需要导航的任何元素,也没有找到下载我的讲座的所有链接,它只给了我以下信息: <html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><

我是一个初学者,试图编写一个程序,自动从我的大学网站下载讲座。我目前正在尝试使用SeleniumWebDriver来实现这一点,我已经成功地选择了位于iFrame中的讲座,就像这样

问题是,当我切换到相关的iFrame时,它实际上并没有加载我需要导航的任何元素,也没有找到下载我的讲座的所有链接,它只给了我以下信息:

<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><iframe 
frameborder="0" height="100%" width="100%" src="https://content.lecture.unimelb.edu.au/ess/portal/section/MAST10005_2017_SM1
"></iframe></body></html>
这是我试图访问的iFrame:

<iframe id="contentFrame" style="display: block; width: 100%; height: 687px;" 
frameborder="0" name="content" title="&nbsp;" src="/webapps/osc-BasicLTI-
bb_bb60/frame.jsp?
course_id=_327002_1&amp;id=lectur&amp;&amp;globalNavigation=false" 
cd_frame_id_="d8705f0d279e5852eaa333951cffc5bf"></iframe>

我需要访问的所有内容都在一个#document标签下面,我没有得到这个标签


我假设由于需要通过第三方登录,我无法访问所需的任何元素。我试图“等待”源代码加载,但它不起作用。有什么方法可以绕过这个问题吗?

在我看来,这是一个附加的安全层,如果是这种情况,那么为什么要导航到
链接,只需使用
driver.switchTo().frame()切换到
然后从那里下载所有讲座,而不必离开原始页面。我之所以导航到它,是为了在访问框架时可以看到源代码的样子。到目前为止,在尝试浏览了所有可能的iFrame之后,没有一个具有我想要的内容。
<iframe id="contentFrame" style="display: block; width: 100%; height: 687px;" 
frameborder="0" name="content" title="&nbsp;" src="/webapps/osc-BasicLTI-
bb_bb60/frame.jsp?
course_id=_327002_1&amp;id=lectur&amp;&amp;globalNavigation=false" 
cd_frame_id_="d8705f0d279e5852eaa333951cffc5bf"></iframe>