設置selenium自動加載flash

設置瀏覽器自動加載爬蟲
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
chromeOpitons = Options()

prefs= {
    "profile.managed_default_content_settings.images":1,
    "profile.content_settings.plugin_whitelist.adobe-flash-player":1,
    "profile.content_settings.exceptions.plugins.*,*.per_resource.adobe-flash-player":1,

}


chromeOpitons.add_experimental_option('prefs', prefs)


driver = webdriver.Chrome('./chromedriver', chrome_options=chromeOpitons)

原作者鏈接:https://blog.csdn.net/weixin_41607151/article/details/80486964

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章