diff --git a/gallery_dl/extractor/luscious.py b/gallery_dl/extractor/luscious.py index 6d8dffc5..bf0a089b 100644 --- a/gallery_dl/extractor/luscious.py +++ b/gallery_dl/extractor/luscious.py @@ -62,7 +62,10 @@ class LusciousAlbumExtractor(AsynchronousExtractor): ("language", '
Language:', ' '), ), values={"gallery-id": self.gid})[0] data["lang"] = util.language_to_code(data["language"] or "", None) - data["artist"] = text.extract(data["tags"], "rtist: ", ",")[0] or None + try: + data["artist"] = text.extract(data["tags"], "rtist: ", ",")[0] or None + except AttributeError: + data["artist"] = None self.section = data["com"] del data["com"] return data diff --git a/gallery_dl/util.py b/gallery_dl/util.py index 9cd223b9..7271674e 100644 --- a/gallery_dl/util.py +++ b/gallery_dl/util.py @@ -87,6 +87,8 @@ def code_to_language(code, default="English"): def language_to_code(lang, default="en"): """Map a language name to its ISO 639-1 code""" + if lang is None: + return None lang = lang.capitalize() for code, language in CODES.items(): if language == lang: