def subscribe_wrapper(email,password,channel_id): session = youtube_session(email, password) if session == -1: cli.debug("Sub: [%s:%s]:UNAUTH -> %s:0" %(email,password,channel_id) ) counters('action-f') return "authenticated" status = YT.subscribe(channel_id, session) counters('action-t') if status == 1 else counters('action-f') cli.debug("Sub: [%s]:LOGGED -> %s:%i" %(email,channel_id,status))
def like_wrapper(email,password,video_id): session = youtube_session(email, password) if session == -1: cli.debug("Like: [%s:%s]:UNAUTH -> %s:0" %(email,password,video_id) ) counters('login-f') return "unauthenticated" status = YT.like(video_id, session) counters('action-t') if status == 1 else counters('action-f') cli.debug("Like: [%s]:LOGGED -> %s:%i" %(email,video_id,status))
def Subscribe(email, password, channel_id): global action_successful global action_faild session = Login(email, password) with lock: if session == -1: cli.debug("Sub: [%s:%s]:UNAUTH -> %s:0" % (email, password, channel_id)) action_faild += 1 else: status = YT.subscribe(channel_id, session) if status == 1: action_successful += 1 else: action_faild += 1 cli.debug("Sub: [%s:%s]:LOGGED -> %s:%i" % (email, password, channel_id, status))
def Like(email, password, video_id): global action_successful global action_faild session = Login(email, password) with lock: if session == -1: cli.debug("Like: [%s:%s]:UNAUTH -> %s:0" % (email, password, video_id)) action_faild += 1 else: status = YT.like(video_id, session) if status == 1: action_successful += 1 else: action_faild += 1 cli.debug("Like: [%s:%s]:LOGGED -> %s:%i" % (email, password, video_id, status))