写爬虫的时候遇到 json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)错误!
这里是把json对象转换为字典返回,所以单纯的用单引号,结果报错
return {
'title': title,
'url': url,
'images': images
}
后面改成双引号正常。
结果: