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

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -