Using selenium-wire disable loading of images and video on web page in firefox

92 views Asked by At

I want to disable loading of images and video on web page in firefox I just want a html without opening images and video. please find my below code

from seleniumwire import webdriver

options = {'proxy': {
            'http': 'http://' + str(username) + ':' + str(password) + '@' + str(PROXY_HOST) + ':' + str(PROXY_PORT),
            'https': 'https://' + str(username) + ':' + str(password) + '@' + str(PROXY_HOST) + ':' + str(PROXY_PORT)
        },
        }
driver = webdriver.Firefox(seleniumwire_options=options)

driver.get(URL)

I tried below code in options

options = {'proxy': {
            'http': 'http://' + str(username) + ':' + str(password) + '@' + str(PROXY_HOST) + ':' + str(PROXY_PORT),
            'https': 'https://' + str(username) + ':' + str(password) + '@' + str(PROXY_HOST) + ':' + str(PROXY_PORT)
        },
        'disable_popup_blocking': True,
        'permissions.default.image': 2}
0

There are 0 answers