Notepad reports an error while Pycharm can execute normally.Why???
-
import requests
from bs4 import BeautifulSoupres = requests.get(‘https://localprod.pandateacher.com/python-manuscript/crawler-html/spider-men5.0.html’)
html = res.text
print(res.status_code)
print(html)UnicodeEncodeError: ‘gbk’ codec can’t encode character ‘\xa9’ in position 3738: illegal multibyte sequence
-
this is a python programming question rather than a npp related one.
See here. Npp doesn’t silently change your code.
Why you get different result can’t be answered from remote - obviously you do have different configurations.