def url(self, location): if location is None: return None url = Url(BASE_URL + location) url.add_param("format", "json") return url
def get_streams(path): url = Url("http://pirateplay.se/api/get_streams.js") url.add_param('url', path) print url.get_url() return url.load_json()