diff --git a/deckbox_crawler.py b/deckbox_crawler.py index 418dc01..8305d12 100644 --- a/deckbox_crawler.py +++ b/deckbox_crawler.py @@ -439,10 +439,13 @@ def getCardsFromTable(self, page_type): # card["tooltip"] = self._HTTP + self._DECKBOX_DOMAIN + self._TOOLTIP.replace("", urllib.parse.quote(card["name"])) edition_container = tr.find(".mtg_edition_container img") - card["edition"] = { - "code": re.search(".*/(.*)_.\.jpg$", edition_container.attr("src")).group(1), - "name": edition_container.attr("data-title") - } + card["edition"] = {} + try: + card["edition"]["code"] = re.search(".*/(.*)_.\.jpg$", edition_container.attr("src")).group(1), + except: + card["edition"]["code"] = None + + card["edition"]["name"] = edition_container.attr("data-title") # card["rarity"] = re.search(".*_(.)\.jpg$", edition_container.attr("src")).group(1)