python爬虫爬到的字符串带\u的解决方法
2018-01-22 10:48
197 查看
a = '\u5386\u9633\u9547'
爬虫得到的如上字符串 若想输出时候返回中文字符解决方法如下:
a = "u'"+a+"'"
print(eval(a)) 历阳镇
相关文章推荐
- Python字符串的encode与decode研究心得乱码问题解决方法
- Python字符串的encode与decode研究心得乱码问题解决方法
- Python字符串的encode与decode研究心得乱码问题解决方法
- python处理字符串时出现的错误'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)" 解决方法
- Python字符串的encode与decode研究心得乱码问题解决方法
- Python字符串的encode与decode研究心得乱码问题解决方法
- 黄聪:python控制台无法正常显示中文字符串解决方法
- Python字符串的encode与decode研究心得乱码问题解决方法
- Python字符串的encode与decode研究心得乱码问题解决方法(很多的编码问题都可以从此得出答案)
- Python字符串的encode与decode研究心得 乱码问题解决方法
- Python字符串的encode与decode研究心得乱码问题解决方法
- Python字符串的encode与decode研究心得乱码问题解决方法
- Python字符串的encode与decode研究心得乱码问题解决方法
- 黄聪:python控制台无法正常显示中文字符串解决方法
- Python字符串的encode与decode研究心得乱码问题解决方法
- Python字符串的encode与decode研究心得乱码问题解决方法
- python处理字符串时出现的错误'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)" 解决方法
- Python字符串的encode与decode研究心得乱码问题解决方法
- Python字符串的encode与decode研究心得乱码问题解决方法
- Python字符串的encode与decode乱码问题解决方法