from bs4 import BeautifulSoup
from selenium import webdriver
import pdfkit
import time
from pdfrw import PdfWriter
driver=webdriver.Chrome()
driver.get('https://www.linkedin.com/in/ankurkhandelwal1/')
time.sleep(40)
soup= BeautifulSoup(driver.page_source, 'lxml')
for div in soup.select('.pv-contact-info__ci-container'):
for link in soup.find_all('a', href=True):
href=link.get('href')
print(href)
我想只打印用户的手机号码和电子邮件ID,但它打印了很多不必要的行。如何准确地获取电子邮件和手机号码?