'str' object does not support item assignment
if reltime != None:
item['reltime'] = reltime.replace(u'\u3000', '').replace(u'\r', '')
else:
item= ''
item['xxx'] = 'sss'
if editor != None:
item[‘editor’] = editor.replace(u’责任编辑’, ‘’).replace(u’责编’, ‘’).replace(u’:’, ‘’).replace(u’:’, ‘’).replace(u’\u3000’, ‘’).replace(u’\r’, ‘’).replace(’ ‘, ‘’).replace(r’[’, ‘’).replace(r’]’, ‘’
)else:
item = ‘’
item[‘xxx’] = ‘ss’
TypeError: ‘str’ object does not support item assignment