How can I retrieve all Tweets and attributes for a given user using Python?

前端 未结 2 1177
故里飘歌
故里飘歌 2020-12-31 11:04

I am attempting to retrieve data from Twitter, using Tweepy for a username typed at the command line. I\'m wanting to extract quite a bit of data about the status and user,s

2条回答
  •  独厮守ぢ
    2020-12-31 11:31

    You're getting 401 response, which means "Unauthorized." (see HTTP status codes)

    Your code looks good. Using api.user_timeline(screen_name="some_screen_name") works for me in the old example I have lying around.

    I'm guessing you either need to authorize the app, or there is some problem with your OAuth setup.

    Maybe you found this already, but here is the short code example that I started from: https://github.com/nloadholtes/tweepy/blob/nloadholtes-examples/examples/oauth.py

提交回复
热议问题