예제 #1
0
파일: yt.py 프로젝트: zonewear/YouTubeShop
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))
예제 #2
0
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))