Ejemplo n.º 1
0
def execute(uname, upasswd):

    xnr = SinaLauncher(uname, upasswd)
    print xnr.login()
    print 'uname::',uname
    uid = xnr.uid
    current_ts = int(time.time())

    timestamp_retweet, timestamp_like, timestamp_at, timestamp_private, \
    timestamp_comment_receive, timestamp_comment_make = newest_time_func(xnr.uid)

    print timestamp_retweet, timestamp_like, timestamp_at, \
       timestamp_private, timestamp_comment_receive, timestamp_comment_make

    #try:
    print 'start run weibo_feedback_follow.py ...'
    fans, follow, groups = FeedbackFollow(xnr.uid, current_ts).execute()
    print 'run weibo_feedback_follow.py done!'
    # except:
    #     print 'Except Abort'
   
    #try:
    print 'start run weibo_feedback_at.py ...'
    FeedbackAt(xnr.uid, current_ts, fans, follow, groups, timestamp_at).execute()
    print 'run weibo_feedback_at.py done!'
    # except:
    #     print 'Except Abort'

    #try:
    print 'start run weibo_feedback_comment.py ...'
    FeedbackComment(xnr.uid, current_ts, fans, follow, groups, timestamp_comment_make, timestamp_comment_receive).execute()
    print 'run weibo_feedback_comment.py done!'
    # except:
    #     print 'Except Abort'

    # try:
    print 'start run weibo_feedback_like.py ...'
    FeedbackLike(xnr.uid, current_ts, fans, follow, groups, timestamp_like).execute()
    print 'run weibo_feedback_like.py done!'
    # except:
    #     print 'Except Abort'

    # try:
    print 'start run weibo_feedback_private.py ...'
    # print 'timestamp_private:::',timestamp_private
    # print 'current_ts::::::',current_ts
    FeedbackPrivate(xnr.uid, current_ts, fans, follow, groups, timestamp_private).execute()
    print 'run weibo_feedback_private.py done!'
    # except:
    #     print 'Except Abort'

    #try:
    print 'start run weibo_feedback_retweet.py ...'
    FeedbackRetweet(xnr.uid, current_ts, fans, follow, groups, timestamp_retweet).execute()
    print 'run weibo_feedback_retweet.py done!'
Ejemplo n.º 2
0
def execute(uname, upasswd):
    # next weibo user_info start receiving
    xnr = SinaLauncher(uname, upasswd)
    login_info = xnr.login()
    if login_info:
        print 'login successful------------================-------------------==================='
        uid = xnr.uid
        print 'uname::next weibo user_info start receiving', uname, xnr.uid
        current_ts = int(time.time())
        timestamp_retweet, timestamp_like, timestamp_at, timestamp_private, \
        timestamp_comment_receive, timestamp_comment_make = newest_time_func(xnr.uid)
        print timestamp_retweet, timestamp_like, timestamp_at, \
           timestamp_private, timestamp_comment_receive, timestamp_comment_make
        # start get follows and fans
        print 'start get follows and fans function weibo_feedback_follow.py...'
        FeedbackFollow(uname, upasswd).execute()

    else:
        print 'login error haaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
        print 'user_name or user_password error about user is ', uname, upasswd
Ejemplo n.º 3
0
def execute(uname, upasswd, account_type):

    xnr = SinaLauncher(uname, upasswd, account_type)
    print xnr.login()
    print 'uname::', uname
    uid = xnr.uid
    current_ts = int(time.time())

    timestamp_retweet, timestamp_like, timestamp_at, timestamp_private, \
    timestamp_comment_receive, timestamp_comment_make = newest_time_func(xnr.uid)
    print '-----------------------------------------------------------------------'
    print timestamp_retweet, timestamp_like, timestamp_at, \
       timestamp_private, timestamp_comment_receive, timestamp_comment_make
    print '++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'

    try:
        print 'start run weibo_feedback_follow.py ...'
        FeedbackFollow(uname, upasswd).execute()
        print 'run weibo_feedback_follow.py done!'
    except:
        print uname, upasswd
        print 'Except Abort'
Ejemplo n.º 4
0
def execute(uname, upasswd):
    # next weibo user_info start receiving
    xnr = SinaLauncher(uname, upasswd)
    login_info = xnr.login()
    if login_info:
        print 'login successful------------================-------------------==================='
        uid = xnr.uid
        print 'uname::next weibo user_info start receiving',uname,xnr.uid
        current_ts = int(time.time())
        timestamp_retweet, timestamp_like, timestamp_at, timestamp_private, \
        timestamp_comment_receive, timestamp_comment_make = newest_time_func(xnr.uid)
        print timestamp_retweet, timestamp_like, timestamp_at, \
           timestamp_private, timestamp_comment_receive, timestamp_comment_make

        try:
            print 'start run weibo_feedback_comment.py ...'
            FeedbackComment(uname, upasswd).execute()
            print 'run weibo_feedback_comment.py done!'
        except Exception as e:
            print e
    else:
        print 'login error haaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
        print 'user_name or user_password error about user is ', uname,upasswd