【发布时间】:2025-12-06 16:55:01
【问题描述】:
我是 PhantomJs 的新手。我通过 selenium webdriver 使用 phantomjs 和 python 作为我的语言。我想伪造我的 Flash 插件信息,这些信息使用 javascript 非常明显。
我想在 Python 中使用 selenium webdriver 做这样的事情(在 javascript 中完成)。
page.onInitialized = function () {
page.evaluate(function () {
(function () {
window.navigator.plugins = {
'length': 1,
'Shockwave Flash': {
'description':'fakeflash'
}
};
})();
});
};
不知道如何在Python中实现page.onInitialized等功能(用selenium webdriver) 任何帮助将不胜感激。
【问题讨论】:
标签: javascript python selenium phantomjs navigator