python - How to make each tweet on its own line? -


i wanting have each tweet on own line.

currently, breaks @ each response (i listed response_1...i using through response_10)

any ideas?

#!/usr/bin/env python  import urllib import json  response_1 = urllib.urlopen("http://search.twitter.com/search.json?q=microsoft&page=1") in response_1:     print (i, "\n") 

you have parse json python object first, can iterate on it.

#!/usr/bin/env python                                                                                                import urllib import json  response_1 = json.loads(urllib.urlopen("http://search.twitter.com/search.json?q=microsoft&page=1").read()) in response_1['results']:     print (i, "\n") 

Comments

Popular posts from this blog

Winapi c++: DialogBox hangs when breaking a loop -

vb.net - Font adding using PDFsharp -

javascript - jQuery iScroll clickable list elements while retaining scroll? -