This commit is contained in:
Hellow2
2023-02-01 14:26:54 +01:00
parent 18eef1234d
commit 611fbe575d
2 changed files with 25 additions and 1 deletions

View File

@@ -334,6 +334,7 @@ class EncyclopaediaMetallum(Page):
if "Country of origin:" == title_text:
href = data.find('a').get('href')
country = pycountry.countries.get(alpha_2=href.split("/")[-1])
artist.country = country
continue
# not needed: Location: Minot, North Dakota
@@ -349,13 +350,20 @@ class EncyclopaediaMetallum(Page):
continue
if "Genre:" == title_text:
genre = data.text
artist.general_genre = genre
continue
if "Lyrical themes:" == title_text:
lyrical_themes = data.text.split(", ")
artist.lyrical_themes = lyrical_themes
continue
if "Current label:" == title_text:
label_name = data.text
label_url = data.find("a").get("href")
for album in artist.main_albums:
if album.label is not None:
continue
album.label = label_name
continue
"""
@@ -372,6 +380,8 @@ class EncyclopaediaMetallum(Page):
print("lyrical themes", lyrical_themes)
print("label", label_name, label_url)
return artist
@classmethod