Example #1
0
def like_tweet_func(account_name, password, r_mid):

    xnr = SinaLauncher(account_name, password)
    xnr.login()
    user = SinaOperateAPI(xnr.uid)
    user.r_mid = r_mid
    mark = user.like()

    return mark
Example #2
0
def private_tweet_func(account_name, password, text, r_mid):
    xnr = SinaLauncher(account_name, password)
    xnr.login()
    user = SinaOperateAPI(xnr.uid)
    user.text = text
    user.r_mid = r_mid
    mark = user.privmessage()

    return mark
Example #3
0
def reply_tweet_func(account_name, password, text, r_mid, mid, uid):
    xnr = SinaLauncher(account_name, password)
    xnr.login()
    user = SinaOperateAPI(xnr.uid)
    user.text = text
    user.r_mid = r_mid
    # user.r_uid = xnr.uid
    user.uid = uid
    user.cid = mid
    mark = user.receive()
    return mark
Example #4
0
def follow_tweet_func(xnr_user_no, account_name, password, uid, trace_type):

    xnr = SinaLauncher(account_name, password)
    xnr.login()
    user = SinaOperateAPI(xnr.uid)
    user.r_mid = uid
    mark = user.followed()
    save_type = 'followers'
    follow_type = 'follow'
    save_to_fans_follow_ES(xnr_user_no, uid, save_type, follow_type,
                           trace_type)

    return mark
Example #5
0
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