Simple streaming twitter bot with phrase matching
✓ Published0🌍 Public
Aabehmiel
Last edited Jul 18, 2017
Created on Jul 18, 2017
This example demonstrates a live Twitter stream filter that detects tweets containing “hello world” phrase variants and prints the matching tweet and a randomized commentary message. It uses Tweepy’s StreamListener to monitor the public stream for keywords “hello” and “world,” ignoring retweets. On a match, it constructs a reply message with the tweet’s URL and prints it, while the retweet and status-update actions remain commented out. The code relies on Tweepy’s OAuth authentication and the Twitter streaming API, with credentials loaded from a separate creds module.
AI-generated description