python - 无法使用 chrome 在 Python Selenium 上加载我的个人资料
问题描述
我正在尝试通过 google chrome 抓取数据,为了避免一些验证码抓取网站,我必须使用我的帐户登录(用户名和密码保存在 chrome 上)。
ua = UserAgent()
a = ua.random
user_agent = ua.random
print(user_agent)
options = webdriver.ChromeOptions()
options.add_argument(f'user-agent={user_agent}')
options.add_argument("user-data-dir=C:\\Users\30693\\AppData\\Local\\Google\\Chrome\\User Data")
driver = webdriver.Chrome(executable_path=r'C:\Windows\chromedriver.exe', options=options)
driver.get("https://www.spitogatos.gr/pwliseis-katoikies/athina-notia-proastia/")
https://imgur.com/gallery/vUaWtKG
我做错了什么?
先感谢您
解决方案
推荐阅读
- c# - 在 C# 中发送 HTTP 请求失败
- reactjs - 单击按钮时输入未更新
- jquery - HTML5 JQuery - 发布前加密游戏分数?
- wordpress - WordPress 多站点子站点 WP 管理员不工作
- c# - 使用python将音频文件发送到api
- jquery - JQuery Uncaught TypeError: $(...).resizable is not a function
- python - 索引大型json时出现python elasticsearch超时错误
- php - 删除链接文本mysql的最后一部分
- c# - 在 .NET Standard 上实现异步返回类型
- sql - 我需要一个包含前几行总和的新行