Update server.py
This commit is contained in:
parent
08a6f022ae
commit
3ea843080f
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||||
|
|
Reference in a new issue