websockets 模块版本降级为 8.1

添加更详细的日志
master
Mufanc 3 years ago
parent cd1b66193e
commit 12682411f0

@ -34,6 +34,8 @@ class Browser(object):
})() })()
'''))['result']['value'])['data'] '''))['result']['value'])['data']
spider_user = configs['user']['username'] spider_user = configs['user']['username']
logger.debug(f'spider: {spider_user}')
logger.debug(f'iSmart client: {json.dumps(user_info, indent=4)}')
if spider_user != user_info['mobile'] and spider_user != user_info['username']: if spider_user != user_info['mobile'] and spider_user != user_info['username']:
logger.warning('检测到 iSmart 客户端中登录的账号与配置文件中账号不符!') logger.warning('检测到 iSmart 客户端中登录的账号与配置文件中账号不符!')
choice = input('继续使用可能会出现意料之外的问题,是否继续?[y/N]') choice = input('继续使用可能会出现意料之外的问题,是否继续?[y/N]')

@ -1,3 +1,4 @@
import json
from hashlib import md5 from hashlib import md5
from random import random from random import random
@ -134,8 +135,9 @@ class Spider(httpx.AsyncClient):
params={ params={
'ticket': ticket 'ticket': ticket
} }
)).json()['data'] )).json()
return paper_info logger.debug(f'paper_info: {json.dumps(paper_info, indent=4)}')
return paper_info['data']
async def user_info(self): async def user_info(self):
logger.info('正在获取用户信息...') logger.info('正在获取用户信息...')
@ -168,4 +170,5 @@ class Spider(httpx.AsyncClient):
'bookType': 0 'bookType': 0
} }
)).json() )).json()
logger.debug(f'book_info: {json.dumps(book_info, indent=4)}')
return book_info['data'] return book_info['data']

@ -3,5 +3,5 @@ opencv-python~=4.5.3.56
numpy~=1.21.2 numpy~=1.21.2
httpx~=0.19.0 httpx~=0.19.0
beautifulsoup4~=4.10.0 beautifulsoup4~=4.10.0
websockets~=10.0 websockets~=8.1
PyYAML~=5.4.1 PyYAML~=5.4.1
Loading…
Cancel
Save