from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.keys import Keys
driver = webdriver.Firefox(executable_path='/home/geckodriver')
driver.get('https://web.whatsapp.com/')
#function to check weather qr code is scanned or not
您好,我正在尝试编写一个“等待”功能,直到用户实际扫描QR码为止,即如果他已登录则返回True,否则返回False。我在“网络”标签中检查了此操作的完成情况,基本上这是对WhatsApp的POST,然后用户已登录。
如果还有另一种方法可以做到,那么我非常的高兴。