Example #1
0
File: cron.py Project: ybak/myblog
 def get(self):
     auth = BasicAuthHandler("user", "password")
     api = API(auth, source="3990552168")
     timeline = api.user_timeline(count=1, page=1)[0]
     tweet = Tweet.all().get()
     if not tweet:
         tweet = Tweet(text=timeline.text, date=timeline.created_at)
     tweet.text = timeline.text
     tweet.date = timeline.created_at
     tweet.put()