async def details(self, app_id): url = utils.build_url('details', app_id) try: response = await self.send_request('GET', url, params=self._params) soup = BeautifulSoup(response, 'lxml') except ClientResponseError as e: raise ValueError('INVALID_APPLICATION_ID: {app}. {error}'.format( app=app_id, error=e)) app_json = utils.parse_app_details(soup) app_json.update({'app_id': app_id, 'url': url}) return prune_data(app_json)
def details(self, app_id): url = build_url('details', app_id) try: response = send_request('GET', url, params=self.params) soup = BeautifulSoup(response.content, 'lxml', from_encoding='utf8') except requests.exceptions.HTTPError as e: raise ValueError('Invalid application ID: {app}. {error}'.format( app=app_id, error=e)) app_json = parse_app_details(soup) app_json.update({ 'app_id': app_id, 'url': url, }) return app_json
def details(self, app_id): """Sends a GET request and parses an application's details. :param app_id: the app to retrieve details, e.g. 'com.nintendo.zaaa' :return: a dictionary of app details """ url = build_url("details", app_id) try: response = send_request("GET", url, params=self.params) soup = BeautifulSoup(response.content, "lxml", from_encoding="utf8") except requests.exceptions.HTTPError as e: raise ValueError("Invalid application ID: {app}. {error}".format( app=app_id, error=e)) app_json = parse_app_details(soup) app_json.update({"app_id": app_id, "url": url}) return app_json
def details(self, app_id): """Sends a GET request and parses an application's details. :param app_id: the app to retrieve details, e.g. 'com.nintendo.zaaa' :return: a dictionary of app details """ url = build_url('details', app_id) try: response = send_request('GET', url, params=self.params) soup = BeautifulSoup(response.content, 'lxml', from_encoding='utf8') except requests.exceptions.HTTPError as e: raise ValueError('Invalid application ID: {app}. {error}'.format( app=app_id, error=e)) app_json = parse_app_details(soup) app_json.update({ 'app_id': app_id, 'url': url, }) return app_json
def details(self, app_id): """Sends a GET request and parses an application's details. :param app_id: the app to retrieve details, e.g. 'com.nintendo.zaaa' :return: a dictionary of app details """ url = build_url('details', app_id) try: response = send_request('GET', url, params=self.params) soup = BeautifulSoup(response.content, 'lxml', from_encoding='utf8') except requests.exceptions.HTTPError as e: raise ValueError('Invalid application ID: {app}. {error}'.format( app=app_id, error=e)) app_json = parse_app_details(soup) app_json.update({ 'app_id': app_id, 'url': url, }) return app_json