はじめに 歯医者の待ち時間が暇だったので・・・ お遊び感覚でツイッターのトレンドを取得するものを考えてみました。 今回もtweepyを使いました。 本題 #!/usr/bin/env python # -*- coding:utf-8 -*- import tweepy import sys def get_oauth(): consumer_key = '' consumer_secret = '' access_key = '' access_secret = '' auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth.set_access_token(access_key, access_secret) return auth def get_trends(api, woeid): trend = api.tre