将whatsapp登录保存到文件中,将其加载到selenium中


from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException, TimeoutException

driver = webdriver.Firefox(executable_path='/home/geckodriver')
driver.get('https://web.whatsapp.com/')  # scans QR code and redirected
driver.get('https://google.com')
driver.get('https://web.whatsapp.com/')  # is automatically in
# driver.get_cookies() empty list

有没有办法保存登录信息,这样如果我关闭驱动程序并重新打开它,我也会自动登录Whatsapp?

理想情况下,我想创建一个文件,以便驱动程序从中读取并加载登录信息。

由于reCAPTCHA,您实际上无法模拟WhatApp登录。

网站可以很容易地检测网络流量,并将您的程序识别为BOT。谷歌已经发布了5(五(个reCAPTCHA,供您在创建新网站时选择。

只有使用您的服务,才能自动进行reCatcha传递。

最新更新