# 設定瀏覽設備
mobileEmulation = {'deviceName': 'Pixel 2'}
options.add_experimental_option('mobileEmulation', mobileEmulation)
# 設定無頭瀏覽器
options.add_argument('--headless')
# 禁止加載圖片
options.add_argument("blink-settings=imagesEnabled=false")
# linux環境運行報錯時配置
options.add_argument("--disable-gpu")
options.add_argument("--no-sandbox")
options.add_argument("--hide-scrollbars")
options.add_argument('--disable-dev-shm-usage')
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/377036.html
標籤:其他
上一篇:憤世嫉俗的程式員,總在網上發表言論,當起了“鍵盤俠”
下一篇:postman配置全域token
