The import json
If __name__=="__main__" :
A=6
For num range in (a) :
B=0
With the open (' collect - test/default bookmarks' + STR (num + 1) + 'json', 'r', encoding="utf-8") as f:
Whole=json. The load (f)
Data=https://bbs.csdn.net/topics/whole (' data ')
Medias=data [' medias']
With the open (' collect - test/default bookmarks. Json ', 'ab +) as fp:
For I in medias:
Json. Dump (I, fp)
Line 13 error: TypeError: a bytes - like the object is required, not 'STR'
I put into a dict I (I) to the wrong, why?