From 72491f7a9920e0d0d9752a634e59548fb5588e4a Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 2 Aug 2021 20:46:56 +0300 Subject: [PATCH] Last.fm now even skips an empty when no bio --- src/pylast/__init__.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/pylast/__init__.py b/src/pylast/__init__.py index e192fa2..c24cd43 100644 --- a/src/pylast/__init__.py +++ b/src/pylast/__init__.py @@ -1798,9 +1798,14 @@ class Artist(_Taggable): else: params = None - return self._extract_cdata_from_request( - self.ws_prefix + ".getInfo", section, params - ) + try: + bio = self._extract_cdata_from_request( + self.ws_prefix + ".getInfo", section, params + ) + except IndexError: + bio = None + + return bio def get_bio_published_date(self): """Returns the date on which the artist's biography was published."""