twintproject / twint

An advanced Twitter scraping & OSINT tool written in Python that doesn't use Twitter's API, allowing you to scrape a user's followers, following, Tweets and more while evading most API limitations.
MIT License
15.66k stars 2.72k forks source link

AttributeError: module 'twint.output' has no attribute 'tweets_object' #633

Closed tibor closed 4 years ago

tibor commented 4 years ago

Issue Template

Please use this template!

Initial Check

If the issue is a request please specify that it is a request in the title (Example: [REQUEST] more features). If this is a question regarding 'twint' please specify that it's a question in the title (Example: [QUESTION] What is x?). Please only submit issues related to 'twint'. Thanks.

Make sure you've checked the following:

Command Ran

import twint

c = twint.Config()
c.Username = 'realDonaldTrump'
c.Store_object = True
c.Limit = 10

twint.run.Search(c)

tweets = twint.output.tweets_object

for tweet in tweets:
    print('{}'.format(tweet.id))

Description of Issue

When I run the script above, Python would stop with: AttributeError: module 'twint.output' has no attribute 'tweets_object'

I’ve changed my code to use c.Store_object_tweets_list = tweets instead and that works fine. However, I thought opening a ticket might be helpful if this is a bug.

Environment Details

macOS 10.14.6

pielco11 commented 4 years ago

https://github.com/twintproject/twint/wiki/Storing-objects-in-RAM#tweets

twint.output.tweets_object was changed to twint.output.tweets_list

I've not found deprecated examples in our documentation, where did you get that example?

tibor commented 4 years ago

Okay, thanks! I found it via google in #461

What we've done in the meantime is added a key to the config object called c.Store_object_tweets_list which points to the list we want to store them in. If such an option is not specified, we default to using twint.output.tweets_object.