INNER CODE UNIT · Python
findFactory
cwuom/NeriPlayer · tools_pub/ytmusic_api_probe.py:115
const findFactory = () => {
try {
const direct = topWindow?.['havuokmhhs-0']?.bevasrs?.wpc;
if (typeof direct === 'function') {
return direct;
}
for (const key of Object.getOwnPropertyNames(topWindow || {})) {
const candidate = topWindow?.[key]?.bevasrs?.wpc;
if (typeof candidate === 'function') {
return candidate;
}
}
} catch (error) {}
return null;
};
const webPlayerContexts = getConfig('WEB_PLAYER_CONTEXT_CONFIGS') || {};
const bindsToVideoId = Object.values(webPlayerContexts).some((context) => {
const flags = String(context?.serializedExperimentFlags || '');