Archived
1
0
Fork 0
This commit is contained in:
yzhh 2020-08-15 14:57:00 +08:00
parent 1dd1bb06dd
commit 7c1c462683
8 changed files with 13 additions and 16 deletions

View file

@ -5,7 +5,7 @@ import re
import aiohttp
from UTC8 import UTC8
from pbc import main2
from pbc import pbc2
async def ab():
@ -21,7 +21,7 @@ async def ab():
for x in file['query']['abuselog']:
d.append('' + x['title'] + ' - ' + x['user'] + '' + UTC8(x['timestamp'], 'onlytimenoutc') + '\n过滤器名:' + x[
'filter'] + '\n处理结果:' + x['result'])
y = await main2(d)
y = await pbc2(d)
space = '\n'
f = re.findall(r'.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*', space.join(y))
if f[0].find('<吃掉了>') != -1 or f[0].find('<全部吃掉了>') != -1:

View file

@ -3,7 +3,7 @@ import aiohttp
import json
import re
from pbc import main2
from pbc import pbc2
async def new():
@ -19,7 +19,7 @@ async def new():
for x in file['query']['logevents']:
d.append(x['title'])
print(str(d))
y = await main2(d)
y = await pbc2(d)
space = '\n'
print(str(y))
j = space.join(y)

View file

@ -1,3 +0,0 @@
from pbc import main
import asyncio
print(asyncio.run(main()))

View file

@ -6,7 +6,7 @@ from datetime import datetime
from mirai import Mirai, Group, MessageChain, Member, Plain, At, Source, Image, Friend
from UTC8 import UTC8
from pbc import main
from pbc import pbc1
qq = 2052142661 # 字段 qq 的值
authKey = '1145141919810' # 字段 authKey 的值
@ -37,7 +37,7 @@ async def newbie(app: Mirai):
if xz['title'] in qq:
pass
else:
s = await main(UTC8(xz['timestamp'], 'onlytime') + '新增新人:' + xz['title'])
s = await pbc1(UTC8(xz['timestamp'], 'onlytime') + '新增新人:' + xz['title'])
print(s)
if s[0].find("<吃掉了>") != -1 or s[0].find("<全部吃掉了>") != -1:
await app.sendGroupMessage(731397727, message=s[

6
pbc.py
View file

@ -31,7 +31,7 @@ print(accessKeyId)
print(accessKeySecret)
async def main(newUsers):
async def pbc1(newUsers):
Users = []
Users.append(newUsers)
print('hello')
@ -106,7 +106,7 @@ async def main(newUsers):
return (await resp.text())
async def main2(newUsers):
async def pbc2(newUsers):
print('hello')
body = {
"scenes": [
@ -180,4 +180,4 @@ async def main2(newUsers):
if __name__ == '__main__':
asyncio.run(main())
asyncio.run(pbc1())

View file

@ -4,7 +4,7 @@ import json
import re
from UTC8 import UTC8
from pbc import main2
from pbc import pbc2
async def rc():
@ -19,7 +19,7 @@ async def rc():
d = []
for x in file['query']['recentchanges']:
d.append(x['title'] + ' - ' + x['user'] + ' ' + UTC8(x['timestamp'], 'onlytime'))
y = await main2(d)
y = await pbc2(d)
print(y)
space = '\n'
f = re.findall(r'.*\n.*\n.*\n.*\n.*', space.join(y))

View file

@ -6,7 +6,7 @@ from .be import main
async def server(address):
matchObj = re.match(r'(.*):(.*).*', address, re.M | re.I)
matchObj = re.match(r'(.*):(.*)', address, re.M | re.I)
servers = []
try:

View file

@ -6,7 +6,7 @@ from .be import main
async def serverraw(address):
matchObj = re.match(r'(.*):(.*).*', address, re.M | re.I)
matchObj = re.match(r'(.*):(.*)', address, re.M | re.I)
servers = []
try: