I'm trying to print out the following request in Python (using the requests module):
r = requests.get("http://www.youtube.com",
params={
"search_query": "test"
}).text
However, when printing, I get the following error:
UnicodeEncodeError: 'charmap' codec can't encode characters in position 32891-32894: character maps to
<undefined>
I'm sure it's not the module itself, as there seem to be no other occurrences of this based on some googling, and the fact that it's working with other requests I try. It seems to be only this request that cannot be printed.
Would anyone know how to print it?
Edit: Now I'm really confused: this program worked once for me, and has not worked once since that one occurence.