Targeting Twitter Trends Script

I noticed that several accounts are spamming the twitter trends. Go to twitter.com and select one of the trends in the right column. You’ll undoubtedly see some tweets that are blatantly inserting words from the trending topics list into unrelated ads.

I was curious just how easy it would be to get the trending topics to target them with tweets. Turns out it is amazingly simple and shows off some of the beauty of Python.

This script doesn’t actually do anything with the trend information. It just simply downloads and prints out the list. But combine this code with the sample code from
RSS Twitter Bot in Python and you’ll have a recipe for some seriously powerful promotion.

import simplejson  # http://undefined.org/python/#simplejson
import urllib
 
result = simplejson.load(urllib.urlopen('http://search.twitter.com/trends.json'))
 
print [trend['name'] for trend in result['trends']]

Technorati Tags: , , , , , , ,



RSS feed | Trackback URI

2 Comments »

2011-11-07 12:04:24

social media, business,marketing,blogging…

[...]Targeting Twitter Trends Script | HalOtis[...]…

 
Trackback by forex
2011-11-08 09:32:09

forex…

[...]Targeting Twitter Trends Script | HalOtis[...]…

 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight=""> in your comment.