При попытке спарсить web страницу выдает такую ошибку:
Traceback (most recent call last):
File "C:\Users\Butooz\Desktop\untitled\test.py", line 10, in <module>
print(soup.findAll('a'))
File "C:\Users\Butooz\AppData\Local\Programs\Python\Python35-32\lib\encodings\cp866.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_map)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\xab' in position 3987: character maps to <undefined>
Скрипт выглядит так:
url = 'https://aheku.net/news/'
html = urllib.request.urlopen(url)
soup = BeautifulSoup(html, 'html5lib')
print(soup.findAll('a'))
Как это можно исправить?