2
當我使用selenium抓取'twitter.com'時,我無法阻止自動播放的視頻剪輯。如何阻止視頻剪輯以減少在chromedriver中的內存負擔。如何在chromedriver中阻止視頻
這裏的代碼
chromeOptions = webdriver.ChromeOptions()
prefs = {"profile.managed_default_content_settings.images" : 2}
chromeOptions.add_experimental_option("prefs",prefs)
browser = webdriver.Chrome(executable_path =
'C:/Users/aa/Downloads/chromedriver/chromedriver.exe',
chrome_options=chromeOptions)