import pickle import datetime crate_time_list=[] twitter_id_list=[] twitter_url_list=[] twitter_text_list=[] print(datetime.datetime) with open("status(0)","rb") as f: s=pickle.load(f) jsonstr=s._json create_time=jsonstr.get("created_at") print(datetime.datetime.strptime(create_time,"%a %b %d %H:%M:%S +0000 %Y")) twitter_id_list=jsonstr.get("id") twitter_text_list=jsonstr.get("text")
带转换字符串Thu Mar 22 05:33:41 +0000 2018,格式化字符串"%a %b %d %H:%M:%S +0000 %Y"