Can't add "list:xxxxxxxxxxx" StreamRule to StreamingClient of Twitter API v2

243 Views Asked by At

I can't add "list:XXXXXXXXXX" to my rules (I can add other rules though and they work). What I'm missing?

import tweepy

class TweetPrinter(tweepy.StreamingClient):
    def on_tweet(self, tweet):
        print(tweet)   
printer = TweetPrinter(bearer_token)
printer.add_rules(tweepy.StreamRule("list:XXXXXXXXXX")) 
printer.filter()

After executing this code instead of creating a StreamRule with an id, I got this (checking the list of the rules with printer.get_rules():

Response(data=None, includes={}, errors=[], meta={'sent': '2022-12-27T00:23:44.073Z', 'result_count': 0})

I'm using Tweepy 4.12 and Twitter API v2.

0

There are 0 best solutions below