Add batch string to returned card data
This commit is contained in:
parent
2462d6768a
commit
9064590ad7
1 changed files with 7 additions and 2 deletions
|
@ -51,11 +51,15 @@ class Card:
|
|||
self.tier = kwargs.get("tier")
|
||||
self.claim_count = kwargs.get("claim_count")
|
||||
|
||||
extra = kwargs.get("category")
|
||||
try:
|
||||
self.anime = extra[0]
|
||||
except IndexError:
|
||||
self.anime = None
|
||||
self.batch = None
|
||||
try:
|
||||
extra = kwargs.get("category")
|
||||
|
||||
self.anime = extra[0]
|
||||
self.batch = extra[3]
|
||||
except IndexError:
|
||||
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,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue