mirror of
https://github.com/ClovertaTheTrilobita/SanYeCao-Nonebot.git
synced 2026-04-01 22:04:51 +00:00
refactor(yuc_wiki):移除查询下季新番功能
This commit is contained in:
parent
e637a2e92d
commit
4d8ac00bfb
1 changed files with 0 additions and 16 deletions
|
|
@ -19,9 +19,6 @@ async def get_yuc_wiki(keyword):
|
|||
if keyword == '本季新番':
|
||||
template_name = await generate_season_url()
|
||||
response = requests.get(base_url + f'{template_name}')
|
||||
elif keyword == '下季新番':
|
||||
template_name = await generate_next_season_url()
|
||||
response = requests.get(base_url + f'{template_name}')
|
||||
else:
|
||||
template_name = 'forecast_anime'
|
||||
response = requests.get(new)
|
||||
|
|
@ -47,19 +44,6 @@ async def generate_season_url():
|
|||
quarter_month = ((now.month - 1) // 3) * 3 + 1
|
||||
return f"{now.year}{quarter_month:02d}"
|
||||
|
||||
async def generate_next_season_url():
|
||||
"""
|
||||
获取下季度
|
||||
:return:
|
||||
"""
|
||||
now = datetime.now()
|
||||
quarter_month = ((now.month - 1) // 3) * 3 + 1
|
||||
current_quarter_start = datetime(now.year, quarter_month, 1)
|
||||
|
||||
next_quarter_start = current_quarter_start + timedelta(days=90)
|
||||
next_quarter_month = ((next_quarter_start.month - 1) // 3) * 3 + 1
|
||||
return f"{next_quarter_start.year}{next_quarter_month:02d}"
|
||||
|
||||
async def dispose_html(response):
|
||||
"""
|
||||
处理html
|
||||
|
|
|
|||
Loading…
Reference in a new issue