I’m updating one more time before the project is due, because clearly by my last post I was not anywhere close to having a viable code to show for the final project. According to my proposal, my code should have been perfected by 4/24/15, but I abandoned hope of that long, long ago.
Via my Googling, I found this blog, explaining how to collect tweets using Tweepy. I didn’t fully understand Tweepy, but from there, I learned that there’s a difference between a “Rest” and a “Streaming” API. From the descriptions, I learned that I would need a Rest API, and from there I found a line of code that would do exactly what I need, called GET statuses.
Returns a collection of the most recent Tweets posted by the user indicated by the screen_name or user_id parameters.
The site doesn’t really explain how to use it in context. Based on their example request line of code, I tried:
I went through some tutorials trying to find any that may have used that function. I didn’t see any, but I noticed that all of them had this code at the top that somehow authenticates your bot. I tried including that as well to see if it worked (spoiler alert: it didn’t).
With a week left, I’m going to spend my time playing around with Tweepy API tutorials. I still haven’t made the jump from Dan’s tutorial on how to have bots produce work to my own goal of having bots collect work. If I figure that out, I’ll be satisfied!