pythonBUG锦集:json.decoder.JSONDecodeError: Expecting property name enclosed in double quo错误

写爬虫的时候遇到 json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)错误!

这里是把json对象转换为字典返回,所以单纯的用单引号,结果报错

      return {
                'title': title,
                'url': url,
                'images': images
            }

后面改成双引号正常。

在这里插入图片描述

结果:
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qinglianchen0851/article/details/83796412