mirror of
https://github.com/TeamPGM/PagerMaid_Plugins_Pyro.git
synced 2024-11-25 11:58:06 +00:00
news60s 修复 API
This commit is contained in:
parent
98033c23e2
commit
996b5f9ac4
@ -22,7 +22,7 @@ async def get_news60s() -> None:
|
|||||||
global news60s_cache_time
|
global news60s_cache_time
|
||||||
if news60s_cache_time == date.today() and isfile(f"data{sep}news60s.png"):
|
if news60s_cache_time == date.today() and isfile(f"data{sep}news60s.png"):
|
||||||
return
|
return
|
||||||
resp = await client.get("https://api.emoao.com/api/60s")
|
resp = await client.get("https://api.emoao.com/api/60s", follow_redirects=True)
|
||||||
if resp.is_error:
|
if resp.is_error:
|
||||||
raise ValueError(f"获取失败,错误码:{resp.status_code}")
|
raise ValueError(f"获取失败,错误码:{resp.status_code}")
|
||||||
news60s_cache_time = date.today()
|
news60s_cache_time = date.today()
|
||||||
|
Loading…
Reference in New Issue
Block a user