Esempio n. 1
0
 def GET(self):
     j_param = web.input()
     msgid = j_param.msgid
     print 'get_weibo_by_id, msgid:' + msgid
     j_weibo = _py4weibo.get_weibo(msgid)
     print j_weibo
     return json.dumps(j_weibo)
Esempio n. 2
0
 def GET(self):
     j_msg = _py4weibo.get_weibo("3407911524933786")
     dict_msg = json.loads(j_msg);
     print '[baiku] start:'
     print datetime.datetime.now()
     j_msgs = _py4weibo.get_weibo_tree("", 50)
     print '[baiku] getweibotree:'
     print datetime.datetime.now()
     dict_msgs = json.loads(j_msgs);
     print '[baiku] parse:'
     print datetime.datetime.now()
     html = render.sinaweibodemo2(weibo=dict_msg,weibos=dict_msgs)
     print '[baiku] render:'
     print datetime.datetime.now()
     return html