wechaty微信机器人

cooolr 于 2022-11-22 发布
  1. 下拉docker镜像

     docker pull wechaty/wechaty:latest
    
  2. 启动docker镜像

     export WECHATY_PUPPET_SERVER_PORT="8080"
     export WECHATY_TOKEN="python-wechaty-uos-token"
        
     docker run -ti \
     --name wechaty_puppet_service_token_gateway \
     --rm \
     -e WECHATY_PUPPET_SERVER_PORT \
     -e WECHATY_TOKEN \
     -p "$WECHATY_PUPPET_SERVER_PORT:$WECHATY_PUPPET_SERVER_PORT" \
     wechaty/wechaty:latest bash
    
  3. docker镜像内启动wechaty

     wechaty gateway
    
  4. 复制二维码照片扫码登录
  5. 安装wechaty库

    pip3 install wechaty

  6. 执行python代码联动