Birdseed使用Twitter的搜索API来获取随机数字。
要求:Python2.7+orPython3.3+,pip,andTwitterAppcredentials
使用:
from __future__ import print_functionimport birdseedquery = '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())
评论