# coding: utf-8
from selenium import webdriver
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--disable-gpu')
client = webdriver.Chrome(chrome_options=chrome_options)
# 如果没有把chromedriver加入到PATH中,就需要指明路径 executable_path='/home/chromedriver'
client.get("https://www.aliyun.com/jiaocheng/124644.html")
content = client.page_source
print(content)
谷歌浏览器无头模式
最新推荐文章于 2024-06-12 19:09:20 发布