📜  获取页面源代码 selenium python 代码示例

📅  最后修改于: 2022-03-11 14:47:17.784000             🧑  作者: Mango

代码示例1
from selenium import webdriver
import time

options = webdriver.ChromeOptions()
options.add_argument('--ignore-certificate-errors')
options.add_argument("--test-type")
options.binary_location = "/usr/bin/chromium"
driver = webdriver.Chrome(chrome_options=options)
driver.get('https://python.org')

html = driver.page_source
print(html)