Skip to content

Commit

Permalink
Update announcement.py
Browse files Browse the repository at this point in the history
  • Loading branch information
HibiKier authored Jul 29, 2021
1 parent 517f120 commit 2ad891a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions plugins/draw_card/announcement.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,9 @@ async def update_up_char(self):
context = soup.find('div', {'class': 'mw-parser-output'})
data['char']['title'] = title
data['card']['title'] = title
for big in context.find_all('big'):
r = re.search(r'\d{1,2}/\d{1,2} \d{1,2}:\d{1,2}', str(big.text))
if r:
time = str(big.text)
break
r = re.search(r'(\d{1,2}/\d{1,2} \d{1,2}:\d{1,2} ~ \d{1,2}/\d{1,2} \d{1,2}:\d{1,2})', str(context.text))
if r:
time = str(r.group(1))
else:
logger.error('赛马娘UP无法找到活动日期....取消更新UP池子...')
return check_write(data, pretty_up_char)
Expand Down

0 comments on commit 2ad891a

Please sign in to comment.