Add another fallback date for tracks

In some cases a track may not have an album release or track release date, in this case fallback to when the track was first added to Bandcamp.
master
AnthonyF 2022-05-18 11:54:02 -04:00
parent 8569d6e9fe
commit fe2eafae4b
2 changed files with 4 additions and 2 deletions

View File

@ -51,6 +51,8 @@ class Bandcamp:
album_release = page_json['album_release_date']
if album_release is None:
album_release = page_json['current']['release_date']
if album_release is None:
album_release = page_json['embed_info']['item_public']
try:
album_title = page_json['current']['title']

View File

@ -1,10 +1,10 @@
--index-url https://pypi.python.org/simple/
beautifulsoup4==4.10.0
beautifulsoup4==4.11.1
demjson3==3.0.5
docopt==0.6.2
mutagen==1.45.1
requests==2.26.0
requests==2.27.1
unicode-slugify==0.1.5
mock==4.0.3
chardet==4.0.0