From 575629a531216aec50fcab184479d7bbca03aae1 Mon Sep 17 00:00:00 2001 From: Hellow2 Date: Wed, 1 Feb 2023 09:41:25 +0100 Subject: [PATCH] ma easy attributes --- src/music_kraken/pages/encyclopaedia_metallum.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/music_kraken/pages/encyclopaedia_metallum.py b/src/music_kraken/pages/encyclopaedia_metallum.py index a425970..a7ee7e9 100644 --- a/src/music_kraken/pages/encyclopaedia_metallum.py +++ b/src/music_kraken/pages/encyclopaedia_metallum.py @@ -311,6 +311,11 @@ class EncyclopaediaMetallum(Page): @classmethod def fetch_artist_attributes(cls, artist: Artist, url: str) -> Artist: + r = cls.API_SESSION.get(url) + if r.status_code != 200: + LOGGER.warning(f"code {r.status_code} at {url}") + return artist + return artist @classmethod @@ -342,7 +347,7 @@ class EncyclopaediaMetallum(Page): # DISCOGRAPHY artist = cls.fetch_artist_discography(artist, artist_id) - # External Sources + # EXTERNAL SOURCES artist = cls.fetch_artist_sources(artist, artist_id) return artist