def get_request_url(self, query, filterAdultContents, limit): """Returns the request url expanding the query, filter adult content, and results limit place holders. """ request_url = self.url.replace(u"%s", urlencode(query)) request_url = request_url.replace(u"%a", unicode(int(not filterAdultContents))) request_url = request_url.replace(u"%l", unicode(int(limit))) return request_url
def file_handler(self, path): return 'file://' + urlencode(path)