#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from discoversong.stats import read_to_mention, get_last_mention read_to_mention(sys.argv[1]) print 'now', get_last_mention()
def get_mentions(): rv = api().get_mentions_timeline(since_id=get_last_mention()) rv.sort(key=lambda m: time.strptime(m["created_at"], '%a %b %d %H:%M:%S +0000 %Y')) return rv
#!/usr/bin/env python # -*- coding: utf-8 -*- from discoversong.stats import get_last_mention print get_last_mention()