Exemple #1
0
def comment_tweet_func(account_name, password, text, r_mid, tweet_type,
                       xnr_user_no):

    sina_operate_api = SinaOperateAPI(account_name, password)
    mark = sina_operate_api.comment(mid=r_mid, content=text)
    #mark = user.receive()

    # 保存微博
    if mark:
        try:
            save_mark = save_to_xnr_flow_text(tweet_type, xnr_user_no, text)
        except:
            print 'comment!!'
            print '保存微博过程遇到错误!'
            save_mark = False

    return mark
Exemple #2
0
def comment_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.comment()
    #mark = user.receive()

    # 保存微博
    if mark:
        try:
            save_mark = save_to_xnr_flow_text(tweet_type, xnr_user_no, text)
        except:
            print '保存微博过程遇到错误!'
            save_mark = False

    return mark