Last active
January 22, 2016 05:22
-
-
Save myouju/03199c971988a07a75f0 to your computer and use it in GitHub Desktop.
スピリチュアルエンジニアリング
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import urllib | |
import urllib2 | |
import unirest | |
API_URL="https://dateinfoapi.appspot.com/v1" | |
hubot_url = "" | |
rid = "" | |
if __name__ == "__main__": | |
response = unirest.get(API_URL) | |
rokuyo = response.body['rokuyo'].encode('utf-8') | |
text = "今日は"+rokuyo+"だよ" | |
params = {"rid": rid, "text":text} | |
params = urllib.urlencode(params) | |
req = urllib2.Request(cw_url) | |
req.add_data(params) | |
res = urllib2.urlopen(req) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment