是否可以在ghost.py中运行imacro firefox脚本?我想自动化沉重的ajax网站。
我试着这样做:
from ghost import Ghost
ghost = Ghost(plugins_enabled=True,plugin_path=['C:\Documents and Settings\my\Desktop\addons\addon-3863-latest.xpi'],)发布于 2016-02-01 18:13:51
在Ghost.py中,您可以找到以下代码片段:
if plugin_path:
for p in plugin_path:
Ghost._app.addLibraryPath(p)从事物的外观来看,它期待着一条路径(addLibraryPath),并将自己完成发现。因此,给它一个包含.xpi的路径
注释:这是未经测试的。
在我的Windows 10上,我在Windows地址栏中输入了以下内容:
火狐%AppData%\
\Firefox\Profiles%
然后,我看到一个名为"kswjuot9.default“的文件夹(在您的PC上它可能被命名为其他东西),并单击了它。最后,我找到了一个名为"extensions“的文件夹。
尝试将此"extensions“文件夹的完整地址提供给Ghost.py。我还建议您使用正斜杠,例如
C:/Users/iChux/AppData/Roaming/Mozilla/Firefox/Profiles/kswjuot9.default/extensions
我看到了一个关于如何提取.xpi文件的online link
https://stackoverflow.com/questions/31178277
复制相似问题