for item in links:
name = ""
work_time = ""
cyan_time = ""
phone = ""
sheet.cell(row=1, column=1).value = "Имя"
sheet.cell(row=1, column=2).value = "Опыт работы"
sheet.cell(row=1, column=3).value = "На Циане"
sheet.cell(row=1, column=4).value = "Номер телефона"
driver.get(item)
html = BeautifulSoup(driver.page_source, "html.parser")
if html.find("span", {"class": "_3ea6fa5da8--name--JPPsh"}):
name = html.find("span", {"class": "_3ea6fa5da8--name--JPPsh"}).text
if html.find("span", {"class": "_3ea6fa5da8--color_black_100--kPHhJ _3ea6fa5da8--lineHeight_22px--bnKK9 _3ea6fa5da8--fontWeight_bold--ePDnv _3ea6fa5da8--fontSize_16px--RB9YW _3ea6fa5da8--display_block--pDAEx _3ea6fa5da8--text--g9xAG _3ea6fa5da8--text_letterSpacing__normal--xbqP6"}):
work_time = html.find("span", {"class": "_3ea6fa5da8--color_black_100--kPHhJ _3ea6fa5da8--lineHeight_22px--bnKK9 _3ea6fa5da8--fontWeight_bold--ePDnv _3ea6fa5da8--fontSize_16px--RB9YW _3ea6fa5da8--display_block--pDAEx _3ea6fa5da8--text--g9xAG _3ea6fa5da8--text_letterSpacing__normal--xbqP6"}).text
if html.find("span", {"class": "_3ea6fa5da8--color_black_100--kPHhJ _3ea6fa5da8--lineHeight_22px--bnKK9 _3ea6fa5da8--fontWeight_bold--ePDnv _3ea6fa5da8--fontSize_16px--RB9YW _3ea6fa5da8--display_block--pDAEx _3ea6fa5da8--text--g9xAG _3ea6fa5da8--text_letterSpacing__normal--xbqP6"}):
cyan_time = html.find("span", {"class": "_3ea6fa5da8--color_black_100--kPHhJ _3ea6fa5da8--lineHeight_22px--bnKK9 _3ea6fa5da8--fontWeight_bold--ePDnv _3ea6fa5da8--fontSize_16px--RB9YW _3ea6fa5da8--display_block--pDAEx _3ea6fa5da8--text--g9xAG _3ea6fa5da8--text_letterSpacing__normal--xbqP6"}).text
if html.find("div", {"class": "_3ea6fa5da8--phones_minimized--XieZH"}):
elem = driver.find_element(By.CLASS_NAME, "_9400a595a7--container--J25nK")
driver.execute_script("arguments[0].click();", elem)
WebDriverWait(driver, 10).until(EC.staleness_of(elem))
phone = BeautifulSoup(driver.page_source, "html.parser").find("div", {"class": "_3ea6fa5da8--phones_minimized--XieZH"}).text
driver.close()
print(name, work_time, cyan_time, phone)
driver.quit()