V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
bbxiong
V2EX  ›  Python

请教关于 Python selenium 使用 firefox 指定 profiles 的问题

  •  
  •   bbxiong · 2020-12-02 19:25:18 +08:00 · 1353 次点击
    这是一个创建于 1212 天前的主题,其中的信息可能已经有所发展或是发生改变。

    正常打开浏览器登录以后就不需要滑块答题了,但是 webdriver 启动的 firefox 每次登录都要滑块答题

    profileDir = r"C:\Users\vmware\AppData\Roaming\Mozilla\Firefox\Profiles\jtuws0sz.default-release"
    
    #指定 firefox 浏览器本机默认的 Profiles 目录可以实现记录登录结果,免滑块答题
    webdriver.FirefoxProfile(profileDir)
    
    #但是配置自定义的 profiles 目录却不能保存登录结果,每次都需要滑块答题
    profileDir = "c:\FirefoxPortable\Data\az60if6f.fifa"
    webdriver.FirefoxProfile(profileDir)
    

    请教 slenium 使用 firefox 正确指定自定义 profile 目录的方式.

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1406 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 17:35 · PVG 01:35 · LAX 10:35 · JFK 13:35
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.