Ejemplo n.º 1
0
    following = [username] + following

# Mosquitto client library configuration
mosquitto_address = config.get('mosquitto') or "127.0.0.1:1883"
mosquitto_host, mosquitto_port = mosquitto_address.split(":")

################################################################################
# Twister setup
################################################################################
twister = AuthServiceProxy(twister_url)
all_subs = {}

#print(twister.help())
print("Checking user status for [" + username + "]...")
try:
    twister.follow(username, [username])
except:
    print("Invalid/unknown username: "******"Checking following list...")
print("Expecting at least: " + ', '.join(following))
while True:
    twister_following = twister.getfollowing(username)
    print("Got: " + ', '.join(twister_following))
    if not set(following) <= set(twister_following):
        print("Updating following list...")
        twister.follow(username, following)
        time.sleep(5)
    else:
        break
Ejemplo n.º 2
0
	following = [username] + following

# Mosquitto client library configuration
mosquitto_address = config.get('mosquitto') or "127.0.0.1:1883"
mosquitto_host, mosquitto_port = mosquitto_address.split(":")

################################################################################
# Twister setup
################################################################################
twister = AuthServiceProxy(twister_url)
all_subs = {}

#print(twister.help())
print("Checking user status for ["+username+"]...")
try:
	twister.follow(username, [username])
except:
	print("Invalid/unknown username: "******"Checking following list...")
print("Expecting at least: " + ', '.join(following))
while True:
	twister_following = twister.getfollowing(username) 
	print("Got: " + ', '.join(twister_following))
	if not set(following) <= set(twister_following):
		print("Updating following list...")
		twister.follow(username, following)
		time.sleep(5)
	else:
		break