python scrapy error xxx is not JSON serializable solution

The first case is that the encode() method is used in the crawler file parse function for transcoding. (PS: The transcoding operation should be done in the pipeline file)

In the second case, the second parameter of open() is set to "w", which should be "wb+"

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324797094&siteId=291194637