You are viewing a single comment's thread from:
RE: 利用脚本(steem-python)取关(unfollow)关注列表中的所有账户
You just hit the point
> python import sys import time from steem import Steem account = 'oflyhigh.demo' def get_following(account, steem): list = [] offset = '' while True: temp = steem.get_following(account, offset, 'blog', 100) if (len(temp) 100): list += temp break offset = temp.pop()['following'] list += temp following = [x['following'] for x in list] return following def main(argv=None): steem=Steem() following = get_following(account, steem) print('Following: {}'.
> format(len(following))) print(following) for f in following: try: steem.unfollow(f, what=['blog'], account = account) print('Unfollow ({}) successfully!'