Why &nbsp replace as A in excel while scrape data from website in python , I am trying to solve it with .replace(' ',"") but still not working

Question:

I am using python, Here is my code and screenshot
enter image description here

Category = soup.find('a', class_='article-labels__text b-reith-sans-font').text.replace(' ',"").replace('|',"")

print("""n""")
print("Category: ", Category )

Asked By: Info Rewind

||

Answers:

Try to use .get_text() method instead of .text property

Category = soup.find('a', class_='article-labels__text b-reith-sans-font').get_text(strip=True)
Answered By: Fazlul