Birdseed 使用 Twitter 的搜索 API 来获取随机数字。
要求:Python 2.7+ or python 3.3+, pip, and Twitter App credentials
使用:
from __future__ import print_Function import birdseed query = 'donald trump' Access_key = 'YOUR_ACCESS_KEY' access_secret = 'YOUR_ACCESS_SECRET' consumer_key = 'YOUR_CONSUMER_KEY' consumer_secret = 'YOUR_CONSUMER_SECRET' t = birdseed.Birdseed(query, access_key, access_secret, consumer_key, consumer_secret) print(t.random())