import time
from selenium import webdriver
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait
from webdriver_manager.chrome import ChromeDriverManager
options = webdriver.ChromeOptions()
options.add_argument("start-maximized")
#chrome to stay open to see what's happening in the real word or make it comment to close
options.add_experimental_option("detach", True)
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()),options=options)
URL ='https://advpalata.vrn.ru/registers/reestr_lawyers/'
driver.get(URL)
title=driver.find_element("xpath", '//ul[@class="letter-filter"]//li[1]')
title.click()
page_links = [element.get_attribute('href') for element in driver.find_elements(By.XPATH, "//td[@class='name']//a")]
for link in page_links:
driver.get(link)
time.sleep(2)
print(WebDriverWait(driver, 20).until(EC.visibility_of_element_located((By.XPATH, "//h3"))).text)
driver.close()
I want to extract the name
but they extract the name in different format they will give me output like these page link is https://advpalata.vrn.ru/registers/reestr_lawyers/abdullaev_parviz_zairhan_ogly/
\xd0\x90\xd0\xb1\xd0\xb0\xd0\xba\xd1\x83\xd0\xbc\xd0\xbe\xd0\xb2
but I want output these:
Абдуллаев Парвиз Заирхан оглы