前一章节 bytes-like object 通过urlopen访问qq互联平台接口,返回fd,对其content=fd.read();返回的content为bytes类型字符串对象,并非str;若对其split()等操作时,会报错:a bytes-like object is required, not 'str'需先转换为str:content = str(content, encoding = "utf-8") by 飞~甜 @ 2019-06-25 11:50:41 全文模式 复制地址