1、websocket-client
https://pypi.org/project/websocket_client/
2、依赖库
1) 因为需要用到3des + base64 + md5 加密,所以需要安装pycrypto库,
pycrypto库是个c和python复合型的库,需要编译,编译需要python-de,所以系统必须要先安装python-de
sudo apt-get install python-dev
2) 安装python虚拟机
sudo apt-get install python-pip
sudo pip install virtualenv
在python虚拟机里安装应用程序库
pip install websocket-client
pip install pycrypto
3) 可以启动应用程序了
扫描二维码关注公众号,回复:
6354885 查看本文章
(env) dong@ubuntu:~/sip_ws$ python sip_ws.py
z1
{clientType":1,"userPrivileges":null,"isDeviceLogin":false,"isNeedSelectUser":false,"userRoleType":3,"isDoSuf":true,"failedInfo":"登录成功!","protocolHead":"gis_fl","protocolType":1000006}