auto fix by pre-commit hooks

This commit is contained in:
pre-commit-ci[bot] 2022-05-18 01:04:24 +00:00
parent aa29c57d05
commit 3204e84346

View File

@ -145,6 +145,7 @@ class Bilibili(NewMessage):
raise CategoryNotSupport(post_type)
return Post("bilibili", text=text, url=url, pics=pic, target_name=target_name)
class Bilibililive(StatusChange):
# Author : Sichongzou
# Date : 2022-5-18 8:54
@ -192,7 +193,10 @@ class Bilibililive(StatusChange):
return []
def compare_status(self, target: Target, old_status, new_status) -> list[RawPost]:
if(new_status["live_state"]!=old_status["live_state"] and new_status["live_state"]==1):
if (
new_status["live_state"] != old_status["live_state"]
and new_status["live_state"] == 1
):
return [new_status]
else:
return []
@ -202,4 +206,6 @@ class Bilibililive(StatusChange):
pic = [raw_post["cover"]]
target_name = raw_post["uname"]
text = target_name + "老师的直播 开播啦!小伙伴们请务必速速来围观!"
return Post("bilibililive", text=text, url=url, pics=pic, target_name=target_name)
return Post(
"bilibililive", text=text, url=url, pics=pic, target_name=target_name
)