3

我正在关注关注我的用户,但我还没有关注 Tweepy。我有逻辑,但我的问题是语法。

    for follower in followers_list:
        if follower not in friends_list:
            to_follow.append(follower)  
            print to_follow
    for follower in to_follow:
       print follower
       api.follow(follower)

有谁知道我应该用什么来关注人(代替 api.follow,它不起作用)

4

1 回答 1

4

Is your followers_list filled with Twitter user.screen_names? If so, there's a topic on the issue that should help you out here.

The followers_list should be inside a comma-separated list, like the following:

stream = tweepy.Stream(auth, StreamWatcherListener(), timeout=None)
follow_list = ['1234567890', '2345678901']
track_list = None
stream.filter(follow_list, track_list)
于 2011-06-22T14:52:46.107 回答