def make_profile():
""" Set up a profile and return it """
profile = webdriver.FirefoxProfile()
profile.set_preference("dom.max_chrome_script_run_time", 0)
profile.set_preference("dom.max_script_run_time", 0)
profile.set_preference('dom.ipc.plugins.enabled.libflashplayer.so',
'false')
profile.set_preference("javascript.enabled", False)
#profile_to_use.add_extension(extension=adblock_xpi)
return profile
评论列表
文章目录