Skip to content

Commit

Permalink
v2.8.2 修复一处书写错误导致的BUG,close #62
Browse files Browse the repository at this point in the history
  • Loading branch information
azmiao committed Oct 23, 2023
1 parent 771c6b5 commit dd981cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#### 如果想快速从零开始搭建一个这样的机器人,可以看我的教程哦:[让我栞栞](https://www.594594.xyz/2022/03/05/uma_bot/)

[![image](https://img.shields.io/badge/license-GPL3.0-blue.svg)](https://raw.githubusercontent.com/azmiao/uma_plugin/main/LICENSE)
[![image](https://img.shields.io/badge/release-2.8.1-orange.svg)](https://github.com/azmiao/uma_plugin)
[![image](https://img.shields.io/badge/release-2.8.2-orange.svg)](https://github.com/azmiao/uma_plugin)
[![image](https://img.shields.io/badge/auther-AZMIAO-blue.svg)](https://github.com/azmiao/uma_plugin)

</div>
Expand Down Expand Up @@ -93,17 +93,19 @@ https://github.com/azmiao/uma_plugin/

## 最近的更新日志

+ 23-10-23 v2.8.2 修复一处书写错误导致的BUG,[# 62](https://github.com/azmiao/uma_plugin/issues/62)

+ 23-09-07 v2.8.1 适配国服马娘新闻

+ 23-09-05 v2.8.0 适配国服卡池和支援卡节奏榜

+ 23-08-25 v2.7.14 修复节奏榜获取失败的问题

+ 23-06-28 v2.7.13 修复马娘抽卡由于名称变更导致的部分报错,[# 53](https://github.com/azmiao/uma_plugin/issues/53)

<details>
<summary>◆ 更以前的更新日志</summary>

+ 23-06-28 v2.7.13 修复马娘抽卡由于名称变更导致的部分报错,[# 53](https://github.com/azmiao/uma_plugin/issues/53)

+ 23-04-13 v2.7.12 修复马娘技能页面更新后的刷新报错

+ 23-03-09 v2.7.11 修复马娘漫画由于图片路径变动导致的问题
Expand Down
6 changes: 3 additions & 3 deletions umamusume_news/news_spider_bili.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ async def get_news_bili():
# 获取新闻更新
async def news_broadcast_bili():
news_list = await sort_news()
current_dir = os.path.join(os.path.dirname(__file__), 'prev_time_tw.yml')
current_dir = os.path.join(os.path.dirname(__file__), 'prev_time_bili.yml')
with open(current_dir, 'r', encoding="UTF-8") as f:
init_time = str(f.read())
init_time = datetime.datetime.strptime(init_time, '%Y-%m-%d %H:%M:%S')
msg = '◎◎ B服马娘新闻更新 ◎◎\n'
for news in news_list:
prev_time = datetime.datetime.strptime(news.news_time, '%Y-%m-%d %H:%M:%S')
if (init_time >= prev_time):
if init_time >= prev_time:
break
else:
news_time = datetime.datetime.strptime(news.news_time, '%Y-%m-%d %H:%M:%S')
Expand Down Expand Up @@ -111,7 +111,7 @@ async def judge_bili() -> bool:
prev_time = news.news_time
break

if (init_time != prev_time):
if init_time != prev_time:
return True
else:
return False

0 comments on commit dd981cb

Please sign in to comment.