Archived
1
0
Fork 0

Update server.py

This commit is contained in:
yzhh 2021-01-09 19:44:10 +08:00
parent 08a6f022ae
commit 3ea843080f

View file

@ -3,7 +3,7 @@ import re
import traceback import traceback
import aiohttp import aiohttp
import asyncio
async def server(address): async def server(address):
matchObj = re.match(r'(.*):(.*)', address, re.M | re.I) matchObj = re.match(r'(.*):(.*)', address, re.M | re.I)
@ -25,6 +25,7 @@ async def server(address):
if req.status != 200: if req.status != 200:
print(await req.text()) print(await req.text())
print(f"请求时发生错误:{req.status}") print(f"请求时发生错误:{req.status}")
await asyncio.sleep(2)
else: else:
motd = await req.text() motd = await req.text()
file = json.loads(motd) file = json.loads(motd)