Python / Tweetpy - User Not Found

0

I am seeing how to extract data from Twitter with Python and Tweetpy, however when I put any user on the list, it does not find them. Am I wrong in the method ?. It is the following:

for handle in handles_list:
    print ('Fetching @' + handle)
    try:
        user = api.get_user(handle)
        followers = user.followers_count
        description = user.description
        for friends in user.friends():
            print (friends.screen_name)
        insert_db(handle, followers, description)
    except:
        print ('--' + handle + ' not found')

The list I'm looking for is the following:

handles_list = ["RISEtoWIN", "Nirvana", 'mudhoney']

And as a result (although they exist) it is:

    
asked by jqc 14.12.2017 в 15:00
source

1 answer

0

And if you try using the screen name explicitly:

>>> user = api.get_user(screen_name = 'Nirvana')

get_user () is supposed to pass you a id but to avoid You can specify ambiguities

Edit:

Check also the level of permissions that your application has in the dashboard , same and I pass a permission, I have it set so:

    
answered by 14.12.2017 в 19:06