fix: don't add year as artist
This commit is contained in:
parent
e3d7ed8837
commit
a0305a7a6e
@ -6,9 +6,9 @@ logging.getLogger().setLevel(logging.DEBUG)
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
commands = [
|
commands = [
|
||||||
"s: #a Crystal F",
|
"s: #a Happy Days",
|
||||||
"10",
|
"7",
|
||||||
"2",
|
"9",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -681,17 +681,20 @@ class Musify(Page):
|
|||||||
anchor: BeautifulSoup = artist_crumb.find("a")
|
anchor: BeautifulSoup = artist_crumb.find("a")
|
||||||
if anchor is not None:
|
if anchor is not None:
|
||||||
href = anchor.get("href")
|
href = anchor.get("href")
|
||||||
artist_source_list: List[Source] = []
|
|
||||||
|
|
||||||
if href is not None:
|
href_parts = href.split("/")
|
||||||
artist_source_list.append(Source(self.SOURCE_TYPE, self.HOST + href.strip()))
|
if not(len(href_parts) <= 1 or href_parts[-2] != "artist"):
|
||||||
|
artist_source_list: List[Source] = []
|
||||||
|
|
||||||
span: BeautifulSoup = anchor.find("span")
|
if href is not None:
|
||||||
if span is not None:
|
artist_source_list.append(Source(self.SOURCE_TYPE, self.HOST + href.strip()))
|
||||||
artist_list.append(Artist(
|
|
||||||
name=span.get_text(strip=True),
|
span: BeautifulSoup = anchor.find("span")
|
||||||
source_list=artist_source_list
|
if span is not None:
|
||||||
))
|
artist_list.append(Artist(
|
||||||
|
name=span.get_text(strip=True),
|
||||||
|
source_list=artist_source_list
|
||||||
|
))
|
||||||
else:
|
else:
|
||||||
self.LOGGER.debug("there are not 4 breadcrumb items, which shouldn't be the case")
|
self.LOGGER.debug("there are not 4 breadcrumb items, which shouldn't be the case")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user