Filter out tweets with links in Streaming Public API Filter


#1

Hi,

I kinda need to filter out discard all the tweets that contains URL since most of them are tweets from news article.
Is there any possible way to not stream these kind of tweets that contain URL during the streaming process?
For example filtering it out?
Thank you and hope to hear from you soon!


#2

I’ve looked into this, and I don’t think there is. The only filtering operator for the “stream” API seems to be “filter_level” which is not what we are looking for.

I can tell you that, using the twitter API designed for Python, I was able to extract the information “entities/urls” and sometimes “entities/media” from a tweet. “entities/urls” is by default an empty list (in Python) and will only be non-empty if there are urls to put inside it. If the tweet contains a picture or other form of media, it will show up in “entities/media”.

Sorry this is so late and specific to Python, but I hope it gets people on the right track!