Python + Twitter streaming feed: how do I scan multiple feeds at the same time

50 views Asked by At

The Twitter handle of the brand that I am tracking is often mis-spelt. People shoot off tweets with lazy spellings or even SMS abbreviations of the brand. We don't want to miss these inputs because we try to analyse what such people who have a passing acquaintance with the brand are saying about us. Question, therefore is: how can I track multiple feeds at the same time (Brand, bRand, Br&nd, Bran'd), other than to set up multiple scan processes? Like in the statement: stream.filter(track=['Brand']), can I input a list?

1

There are 1 answers

0
Leb On

Yes you can. You'll need to create a list then call on that list in the filter.

names = ["Brand, bRand, Br&nd, Bran'd"]

twitterStream.filter(track=names)