Allow Flash content in Chrome 71 running via chromedriver Allow Flash content in Chrome 71 running via chromedriver google-chrome google-chrome

Allow Flash content in Chrome 71 running via chromedriver


I haven't find any option yet, and I'm afraid won't find ever.

The workaround for Windows is to use Group Policies (via adding entries to registry):

reg add HKLM\Software\Policies\Google\Chrome /v DefaultPluginsSetting /d 1 /t REG_DWORD /freg add HKLM\Software\Policies\Google\Chrome\PluginsAllowedForUrls /v 1 /d http://* /t REG_SZ /freg add HKLM\Software\Policies\Google\Chrome\PluginsAllowedForUrls /v 2 /d https://* /t REG_SZ /f

or just create file with .reg extension and put text below into it:

Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google][HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome]"DefaultPluginsSetting"=dword:00000001[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\PluginsAllowedForUrls]"1"="http://*""2"="https://*"

then save and double-click this file.


My little workaround about this, ty to @doctordrue ;)

from winreg import *import sysreg_path = 'Software\Policies\Google\Chrome\PluginsAllowedForUrls'allow_flash = {'1': 'https://url'}if sys.platform == 'win32':    try:        try:            RegistryKey = OpenKey(HKEY_LOCAL_MACHINE, reg_path, 0, KEY_ALL_ACCESS)            for K,V in allow_flash.items():                try:                    if QueryValueEx(RegistryKey, K)[0] == V: pass                    else:                        SetValueEx(RegistryKey, K, 0, REG_SZ, V)                except FileNotFoundError:                    SetValueEx(RegistryKey, K, 0, REG_SZ, V)            CloseKey(RegistryKey)        except FileNotFoundError:            RegistryKey = CreateKey(HKEY_LOCAL_MACHINE, reg_path)            for K, V in allow_flash.items():                SetValueEx(RegistryKey, K, 0, REG_SZ, V)            CloseKey(RegistryKey)    except:        # write_in_log(traceback.format_exc())        pass