def retweet_tweet_func(account_name, password, text, r_mid, tweet_type, xnr_user_no): sina_operate_api = SinaOperateAPI(account_name, password) mark = sina_operate_api.retweet(mid=r_mid, content=text) # 保存微博 if mark: try: save_mark = save_to_xnr_flow_text(tweet_type, xnr_user_no, text) except: print 'retweet!!' print '保存微博过程遇到错误!' save_mark = False return mark
def retweet_tweet_func(account_name, password, text, r_mid, tweet_type, xnr_user_no): xnr = SinaLauncher(account_name, password) xnr.login() user = SinaOperateAPI(xnr.uid) user.text = text user.r_mid = r_mid mark = user.retweet() # 保存微博 if mark: try: save_mark = save_to_xnr_flow_text(tweet_type, xnr_user_no, text) except: print '保存微博过程遇到错误!' save_mark = False return mark