I am getting this error from a python script
UnicodeEncodeError: 'ascii' codec can't encode character '\u2013' in position 424837: ordinal not in range(128)
Here is a part of the code
html_source = driver.page_source
I have opened a page using webdriver and I am trying to get the page source of that page. Consequently, in debugging my script I wanted to see if the source code was being read in correctly. Using the print() statement is when I realized the error.
I have 1000's of pages to read in like this and encountering the em dash will be frequent. So what is the best way to handle this in the script so I don't have to start and stop the script all the time?