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 json | |
import urllib, urllib2 | |
BASE_URL = "http://api.doorkeeper.jp/" | |
def search(**kwargs): | |
params = urllib.urlencode(kwargs) | |
res = urllib2.urlopen("%s/events?%s" % (BASE_URL, params)) |
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 json | |
import urllib, urllib2 | |
BASE_URL = "http://connpass.com/api/v1/event/" | |
def search(**kwargs): | |
params = urllib.urlencode(kwargs) | |
res = urllib2.urlopen("%s?%s" % (BASE_URL, params)) |
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 SimpleHTTPServer | |
import os | |
import urllib | |
class MyReqHundler(SimpleHTTPServer.SimpleHTTPRequestHandler): | |
def translate_path(self, path): | |
path = urllib.unquote(path) |