Created
July 12, 2012 18:55
-
-
Save averyaube/3100128 to your computer and use it in GitHub Desktop.
Growl Notifier for Facebook Likes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gntp.notifier | |
import requests | |
import json | |
import time | |
likes = 0 | |
HARTH_URL = "http://graph.facebook.com/harthrecords" | |
if __name__ == '__main__': | |
while True: | |
try: | |
r = requests.get(HARTH_URL).json | |
if r['likes'] != likes: | |
likes = r['likes'] | |
print str(likes) + " likes!!!" | |
gntp.notifier.mini(str(likes) + " likes!!!", title="Harth Records Likes", applicationName="Harth Records", notificationIcon="https://fbcdn-profile-a.akamaihd.net/hprofile-ak-snc4/373731_175116679184257_1836758117_n.jpg") | |
except: | |
print "oops" | |
time.sleep(60) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment