From 9064590ad713ff2125256f252762ee248185f8f3 Mon Sep 17 00:00:00 2001 From: Henry Le Grys Date: Fri, 23 Oct 2020 19:51:53 +0100 Subject: [PATCH] Add batch string to returned card data --- jaken/soul.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/jaken/soul.py b/jaken/soul.py index 9d235a9..87eab16 100644 --- a/jaken/soul.py +++ b/jaken/soul.py @@ -51,11 +51,15 @@ class Card: self.tier = kwargs.get("tier") self.claim_count = kwargs.get("claim_count") - extra = kwargs.get("category") + self.anime = None + self.batch = None try: + extra = kwargs.get("category") + self.anime = extra[0] + self.batch = extra[3] except IndexError: - self.anime = None + pass self.filename = kwargs.get("file") self.url = f"{self.IMAGE_CDN}/{self.tier}/{self.filename}" @@ -68,4 +72,5 @@ class Card: "anime": self.anime, "link": self.url, "claim_count": self.claim_count, + "batch": self.batch, }