Fix downloading when tralbum-about is not found
This commit is contained in:
@@ -209,8 +209,10 @@ class BCFreeDownloader:
|
||||
@staticmethod
|
||||
def _get_album_data_from_soup(soup: BeautifulSoup) -> BCFreeDownloaderAlbumData:
|
||||
album_data = BCFreeDownloaderAlbumData()
|
||||
album_data.about = soup.find("div", class_="tralbum-about").get_text("\n")
|
||||
album_data.credits = soup.find("div", class_="tralbum-credits").get_text("\n")
|
||||
about = soup.find("div", class_="tralbum-about")
|
||||
album_data.about = about.get_text("\n") if about else None
|
||||
credits = soup.find("div", class_="tralbum-credits")
|
||||
album_data.credits = credits.get_text("\n") if credits else None
|
||||
tags = [tag.get_text() for tag in soup.find_all("a", class_="tag")]
|
||||
album_data.tags = ",".join(sorted(tags))
|
||||
return album_data
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "free-bandcamp-downloader"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
description = "Download free and name-your-price albums from Bandcamp"
|
||||
authors = ["7x11x13 <x7x11x13@gmail.com>"]
|
||||
license = "MIT"
|
||||
|
||||
Reference in New Issue
Block a user