This commit is contained in:
Hellow 2023-03-17 13:11:18 +01:00
parent a27c4e28c3
commit a01ea0cfcd

View File

@ -54,6 +54,7 @@ SortOrder.IsAscending: false
X-Requested-With: XMLHttpRequest X-Requested-With: XMLHttpRequest
""" """
class MusifyTypes(Enum): class MusifyTypes(Enum):
ARTIST = "artist" ARTIST = "artist"
@ -195,7 +196,6 @@ class Musify(Page):
# get the title and year # get the title and year
parse_title_date(anchor.get("title")) parse_title_date(anchor.get("title"))
if "-" in href: if "-" in href:
_id = href.split("-")[-1] _id = href.split("-")[-1]
@ -243,7 +243,6 @@ class Musify(Page):
else: else:
LOGGER.warning("got an unequal ammount than 3 small elements") LOGGER.warning("got an unequal ammount than 3 small elements")
return Album( return Album(
_id=_id, _id=_id,
title=title, title=title,
@ -254,7 +253,7 @@ class Musify(Page):
@classmethod @classmethod
def parse_contact_container(cls, contact_container_soup: BeautifulSoup) -> List[Union[Artist, Album]]: def parse_contact_container(cls, contact_container_soup: BeautifulSoup) -> List[Union[Artist, Album]]:
#print(contact_container_soup.prettify) # print(contact_container_soup.prettify)
contacts = [] contacts = []
# print(contact_container_soup) # print(contact_container_soup)
@ -268,7 +267,7 @@ class Musify(Page):
url = anchor_soup.get("href") url = anchor_soup.get("href")
if url is not None: if url is not None:
#print(url) # print(url)
if "artist" in url: if "artist" in url:
contacts.append(cls.parse_artist_contact(contact)) contacts.append(cls.parse_artist_contact(contact))
elif "release" in url: elif "release" in url:
@ -429,7 +428,6 @@ class Musify(Page):
name = anchor.text name = anchor.text
anchor_list = album_card.find_all("a", recursive=False) anchor_list = album_card.find_all("a", recursive=False)
if len(anchor_list) > 0: if len(anchor_list) > 0:
anchor = anchor_list[0] anchor = anchor_list[0]
@ -449,8 +447,6 @@ class Musify(Page):
if card_body is not None: if card_body is not None:
parse_release_anchor(card_body.find("a"), text_is_name=True) parse_release_anchor(card_body.find("a"), text_is_name=True)
card_footer_list = album_card.find_all("div", {"class": "card-footer"}) card_footer_list = album_card.find_all("div", {"class": "card-footer"})
return Album( return Album(
@ -458,7 +454,6 @@ class Musify(Page):
source_list=source_list source_list=source_list
) )
@classmethod @classmethod
def get_discography(cls, url: MusifyUrl) -> List[Album]: def get_discography(cls, url: MusifyUrl) -> List[Album]:
""" """