def clean(username, password, delay, b=None): # works for only me!
if(b==None):
b = Bot(username, password)
with open("mcclanewhitelist.txt", "r") as f:
whitelist = { line.split(" ")[0] : line.split(" ")[1] for line in f.readlines() }
time.sleep(2)
follower_count = b.get_follower_count(b.id)
print("Followers: "+str(follower_count))
following_count = b.get_following_count(b.id)
print("Following: "+str(following_count))
followers_list = b.get_followers(b.id, follower_count)
following = b.get_following(b.id, following_count)
followers = {}
for thing in followers_list:
followers[thing['node']['id']] = 1
for thing in following:
print(thing)
if not thing['node']['id'] in followers:
b.unfollow(thing['node']['id'])
time.sleep(delay)
评论列表
文章目录