Hello to everyone i hope yall good. i want to extract these numbers from webwhatsapp using selenium
This is my code:
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
import os
dir_path = os.getcwd()
profile = os.path.join(dir_path, "profile", "wpp")
s=Service('chromedriver.exe')
op = webdriver.ChromeOptions()
op.add_experimental_option('excludeSwitches', ['enable-logging'])
op.add_argument(
r"user-data-dir={}".format(profile))
driver = webdriver.Chrome(service=s, options=op)
url='https://web.whatsapp.com'
driver.get(url)
numbers=driver.find_element(By.CLASS_NAME, "zzgSd _3e6xi").text
print(numbers)
But this dosnt work. Please help me!!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.