🐛 修复更新日志
This commit is contained in:
parent
fc41e89458
commit
e8a79dd15d
@ -1,7 +1,10 @@
|
||||
import re
|
||||
from datetime import datetime
|
||||
from typing import List
|
||||
from defs.format_time import strf_time, strp_time
|
||||
|
||||
REMOVE_HTML = re.compile(r"<[^>]+>", re.S)
|
||||
|
||||
|
||||
class Assets:
|
||||
def __init__(self, data: dict):
|
||||
@ -13,7 +16,8 @@ class Release:
|
||||
def __init__(self, data: dict):
|
||||
self.name: str = data["name"]
|
||||
self.url: str = data["url"]
|
||||
self.description: str = data.get("description", "")
|
||||
self.descriptionHTML: str = data.get("descriptionHTML", "")
|
||||
self.description = REMOVE_HTML.sub("", self.descriptionHTML).strip()
|
||||
self.publishedAt: str = strf_time(data["publishedAt"])
|
||||
self.publishedAtTime: datetime = strp_time(data["publishedAt"])
|
||||
self.tagName: str = data["tagName"]
|
||||
|
Loading…
Reference in New Issue
Block a user