Background details:
-Using atom with installed package script
-Python version is 3.8.3
-Trying to web scrape from a URL which is an online directory
-Would like to know more about this error and solve it
-image link of script and error : https://i.stack.imgur.com/QQWtE.jpg
from bs4 import BeautifulSoup
import requests
url = "https://www.timesbusinessdirectory.com/company-listings"
source_url=requests.get(url).text
html=BeautifulSoup(source_url, 'html.parser')
print(html.prettify())
Traceback (most recent call last):
File "C:\Users\User\Desktop\beautiful\scrap.py", line 8, in <module>
print(html)
File "C:\Users\User\AppData\Local\Programs\Python\Python38-32\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u221e' in position 5103: character maps to <undefined>