Compare commits
3 Commits
8fd0c6d922
...
server
| Author | SHA1 | Date | |
|---|---|---|---|
| d77324b714 | |||
| 829ce230a1 | |||
| b1a69bdd94 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -140,3 +140,5 @@ dmypy.json
|
|||||||
# End of https://www.toptal.com/developers/gitignore/api/python
|
# End of https://www.toptal.com/developers/gitignore/api/python
|
||||||
.idea
|
.idea
|
||||||
cqhttp/data
|
cqhttp/data
|
||||||
|
cqhttp/device.json
|
||||||
|
cqhttp/session.token
|
||||||
|
|||||||
Binary file not shown.
@@ -30,7 +30,7 @@ async def handle_first_receive(bot: Bot, event: Event, state: T_State, args= Com
|
|||||||
for item in saishiContent:
|
for item in saishiContent:
|
||||||
if item.html.find("英超") >= 0:
|
if item.html.find("英超") >= 0:
|
||||||
if item.html.find("阿森纳") >= 0 or item.html.find("曼城") >= 0 or item.html.find("曼联") >= 0 or item.html.find(
|
if item.html.find("阿森纳") >= 0 or item.html.find("曼城") >= 0 or item.html.find("曼联") >= 0 or item.html.find(
|
||||||
"利物浦") >= 0 or item.html.find("切尔西") >= 0:
|
"利物浦") >= 0 or item.html.find("切尔西") >= 0 or item.html.find("热刺") >= 0 or item.html.find("纽卡") >= 0:
|
||||||
rouneNum, vsStr = parserSaishiItem(item.html)
|
rouneNum, vsStr = parserSaishiItem(item.html)
|
||||||
if rouneNum not in vsMap.keys():
|
if rouneNum not in vsMap.keys():
|
||||||
vsMap[rouneNum] = []
|
vsMap[rouneNum] = []
|
||||||
|
|||||||
@@ -9,7 +9,8 @@ from nonebot import on_command
|
|||||||
from nonebot.rule import to_me
|
from nonebot.rule import to_me
|
||||||
from requests_html import HTMLSession, HTML
|
from requests_html import HTMLSession, HTML
|
||||||
import json
|
import json
|
||||||
from selenium.webdriver import Chrome, ChromeOptions
|
from nonebot import logger
|
||||||
|
# from selenium.webdriver import Chrome, ChromeOptions
|
||||||
|
|
||||||
tongjiCommand = on_command("统计", rule=to_me(), aliases={'微头条', 'tongji', 'tj'}, priority=10)
|
tongjiCommand = on_command("统计", rule=to_me(), aliases={'微头条', 'tongji', 'tj'}, priority=10)
|
||||||
|
|
||||||
@@ -23,12 +24,19 @@ weitoutiaoMap = {"太能喵": 0, "小小": 0, "大帝强": 0, "叶小欢": 0}
|
|||||||
"""
|
"""
|
||||||
@tongjiCommand.handle()
|
@tongjiCommand.handle()
|
||||||
async def handle_first_receive(bot: Bot, event: Event, state: T_State, args= CommandArg()):
|
async def handle_first_receive(bot: Bot, event: Event, state: T_State, args= CommandArg()):
|
||||||
# 清空原有的weitoutiaoMap中的统计结果
|
from nonebot.exception import MatcherException
|
||||||
for k,v in weitoutiaoMap.items():
|
try:
|
||||||
weitoutiaoMap[k] = 0
|
# 清空原有的weitoutiaoMap中的统计结果
|
||||||
getWeiToutiaoInfo()
|
for k,v in weitoutiaoMap.items():
|
||||||
# 将上周的微头条考核结果发送给用户
|
weitoutiaoMap[k] = 0
|
||||||
await tongjiCommand.finish(str(weitoutiaoMap))
|
getWeiToutiaoInfo()
|
||||||
|
# 将上周的微头条考核结果发送给用户
|
||||||
|
await tongjiCommand.finish(str(weitoutiaoMap))
|
||||||
|
except MatcherException:
|
||||||
|
raise
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(e)
|
||||||
|
print(e)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
获取微头条数据信息
|
获取微头条数据信息
|
||||||
|
|||||||
Reference in New Issue
Block a user