diff --git a/src/music_kraken/pages/musify.py b/src/music_kraken/pages/musify.py index a820770..78bfa6c 100644 --- a/src/music_kraken/pages/musify.py +++ b/src/music_kraken/pages/musify.py @@ -878,7 +878,8 @@ class Musify(Page): if cards_soup is not None: card_soup: BeautifulSoup for card_soup in cards_soup.find_all("div", {"class": "playlist__item"}): - album.song_collection.append(cls.parse_song_card(card_soup)) + new_song = cls.parse_song_card(card_soup) + album.song_collection.append(new_song) if stop_at_level > 1: song: Song diff --git a/src/musify_search.py b/src/musify_search.py index 51459dd..43c8965 100644 --- a/src/musify_search.py +++ b/src/musify_search.py @@ -16,8 +16,9 @@ def fetch_artist(): source_list=[objects.Source(objects.SourcePages.MUSIFY, "https://musify.club/artist/ghost-bath-280348/")] ) - artist = Musify.fetch_details(artist) + artist: objects.Artist = Musify.fetch_details(artist) print(artist.options) + print(artist.main_album_collection[0].source_collection) def fetch_album(): @@ -26,6 +27,12 @@ def fetch_album(): "https://musify.club/release/linkin-park-hybrid-theory-2000-188")] ) + album = objects.Album( + source_list=[ + objects.Source(objects.SourcePages.MUSIFY, "https://musify.club/release/ghost-bath-self-loather-2021-1554266") + ] + ) + album: objects.Album = Musify.fetch_details(album) print(album.options) @@ -37,4 +44,4 @@ def fetch_album(): print(artist.id, artist.name) if __name__ == "__main__": - fetch_artist() + fetch_album()