我只需要对此编码:
from selenium import webdriver
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait as wait
chrome_path = r"C:\Users\666\Desktop\New folder (8)\chromedriver.exe"
driver=webdriver.Chrome(chrome_path)
在ws://127.0.0.1:51491 / devtools / browser / c511792d-8eba-498d-a312-9fd837f06a64上监听的DevTools
url = 'https://www.milversite.club/milver/outsiders-1x01-video_060893d7a.html'
driver.set_page_load_timeout(15)
iframe = driver.find_elements_by_tag_name('iframe')
print (iframe)("utf-8")
out =>
[<selenium.webdriver.remote.webelement.WebElement (session="3d2a99626133163845c0bfbcc2a3bf1c", element="0.45589168341957964-1")>]
如何在[<selenium.webdriver.remote.webelement.WebElement (session="3d2a99626133163845c0bfbcc2a3bf1c", element="0.45589168341957964-1")>]
内获取链接
答案 0 :(得分:0)
您必须以:get(url)
然后,您可以使用以下命令打印所有HTML代码:
html_source = driver.page_source
print(html_source)
希望这对您有帮助!