mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2026-05-10 10:47:56 +08:00
fix #47, fix weibo fulltext
This commit is contained in:
@@ -47,7 +47,7 @@ class Bilibili(NewMessage):
|
||||
)
|
||||
res_dict = json.loads(res.text)
|
||||
if res_dict["code"] == 0:
|
||||
return res_dict["data"]["cards"]
|
||||
return res_dict["data"].get("cards")
|
||||
else:
|
||||
return []
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ class Weibo(NewMessage):
|
||||
)
|
||||
try:
|
||||
full_json_text = re.search(
|
||||
r'"status": ([\s\S]+),\s+"hotScheme"', res.text
|
||||
r'"status": ([\s\S]+),\s+"call"', res.text
|
||||
).group(1)
|
||||
info = json.loads(full_json_text)
|
||||
except:
|
||||
|
||||
Reference in New Issue
Block a user