AttributeError                            Traceback (most recent call last)
<ipython-input-9-4152b890358f> in <module>
     20 t = []
     21 
---> 22 for tweet in tweepy.Cursor(api.search,q=search_key,count=1000,lang="id",since="2022-11-10",until="2022-11-20").items():
     23     print(tweet.created_at,tweet.id,tweet.user.name,tweet.text)
     24     c.append(tweet.created_at)

I can't find api.search in the documentation. Care to tell where I should look for this?

Thanks Dani,

I went to the tweepy docs and couldn't find it. I stopped there and didn't see if there were older docs. Maybe it's another case of deprecation.

It would help if we could see what type of object api is. I'm assuming it was created by some assignment in which case we would (like always) need to see the code. I find a good way to narrow down a problem like this is to use an interactive session like idle and create the objects and code using intellisense to select the appropriate methods and properties. Sometimes it's just a matter of getting the case right.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.