1. 浏览器在传输http协议的时候,会自动将url中的字符串自动转码成其可识别的编码
2. Python 中对字符串进行转码的函数
Python2:urllib.quote()
Python3:urllib.parse.quote()
转码函数的原理示意
3. Requests 库能够自动处理带中文的url请求
图片.png
参考博文:https://blog.csdn.net/w5688414/article/details/79310044?utm_source=blogxgwz8