Output content contains a (\n) new Line, so I can't able to store data in excel? What to do omit the new line in print section?
What I have tried:
for Linkedin_URL in URLs_all_Page:
driver.get(Linkedin_URL)
time.sleep(2)
page_source = driver.page_source
soup = BeautifulSoup(page_source, "html.parser")
ExeName = soup.find('dt', {'class':'flex align-items-center'}).find('span', {'class':'profile-topcard-person-entity__name t-24 t-black t-bold'})
--> soup_ExeName = BeautifulSoup(ExeName.text, 'html.parser')
print(soup_ExeName,"|",soup_PreCompany,"|",soup_NewTitle,"|",soup_Company,"|",soup_tenur)
sheet.append([soup_ExeName, soup_PreCompany, soup_NewTitle, soup_Company, soup_tenur])
#---------------------------------------------------------------------------------------#
OutPut:
Masi Amianda
| Brandywine Nursing & Rehabilitation Center | Workers Compensation Senior Claim Adjuster | AIG |
10 yrs
Cannot convert
Masi Amianda
to Excel