Jul 17, 2010

A bug in tweepy streaming API

I found a bug in tweepy streaming API .
It can't filter by tag with non Latin characters.
I was astonished coz this was working when I used it some months ago (version 1.3 if I remember well).
So here is my small contribution to the project :
def filter(self, follow=None, track=None, async=False):
   params = {}
   self.headers['Content-type'] = "application/x-www-form-urlencoded"
should be :
def filter(self, follow=None, track=None, async=False):
   params = {}
   self.headers['Content-type'] = "application/x-www-form-urlencoded; charset=utf-8"
I have only tested streaming and only tag filtering - probably this applies to other parts but I am not sure.

9 comments:

  1. do you run this on app engine or just plain?

    ReplyDelete
  2. No streaming can't run on App Engine, not until App engine's channel is released then we will see.
    For the time been - I am running it locally then post json results as these come to App Engine for processing.

    ReplyDelete
  3. This comment has been removed by a blog administrator.

    ReplyDelete
  4. This comment has been removed by a blog administrator.

    ReplyDelete
  5. This comment has been removed by a blog administrator.

    ReplyDelete
  6. This comment has been removed by a blog administrator.

    ReplyDelete
  7. This comment has been removed by a blog administrator.

    ReplyDelete
  8. This comment has been removed by a blog administrator.

    ReplyDelete
  9. This comment has been removed by a blog administrator.

    ReplyDelete