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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login