BH4HPA / xueanquan

学安全 / 学校安全教育平台 / safetree / xueanquan 批量学习工具
GNU General Public License v3.0
25 stars 13 forks source link

求助,为何会出现如下情况 #8

Closed sakurayun closed 3 years ago

sakurayun commented 3 years ago
==========================
正在处理 2079405980 tianshufang0702
登录返回 200 1 田淑芳 1090C0320E87D5E555FDC787826B298E
学知识 200 false 请先登录
node:internal/process/promises:246
          triggerUncaughtException(err, true /* fromPromise */);
          ^

<ref *1> Error: read ECONNRESET
    at TLSWrap.onStreamRead (node:internal/stream_base_commons:220:20) {
  errno: -4077,
  code: 'ECONNRESET',
  syscall: 'read',
  config: {
    url: 'https://huodongapi.xueanquan.com/p/zhejiang/Topic/topic/platformapi/api/v1/records/sign',
    method: 'post',
    data: '{"specialId":663,"step":2}',
    headers: {
      Accept: 'application/json, text/plain, */*',
      'Content-Type': 'application/json;charset=utf-8',
      Referer: 'https://zhoukou.xueanquan.com/login.html',
      Cookie: 'RecordLoginInput_20083=tianshufang0702; SafeApp=true; ServerSide=https://zhoukou.xueanquan.com; UserID=1090C0320E87D5E555FDC787826B298E; _UCodeStr={%0d%0a  "Grade": 11,%0d%0a  "ClassRoom": 1088163,%0d%0a  "CityCode": 190032%0d%0a};',
      'User-Agent': 'axios/0.21.1',
      'Content-Length': 26
    },
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    adapter: [Function: httpAdapter],
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    validateStatus: [Function: validateStatus]
  },
  request: <ref *4> Writable {
    _writableState: WritableState {
      objectMode: false,
      highWaterMark: 16384,
      finalCalled: false,
      needDrain: false,
      ending: false,
      ended: false,
      finished: false,
      destroyed: false,
      decodeStrings: true,
      defaultEncoding: 'utf8',
      length: 0,
      writing: false,
      corked: 0,
      sync: true,
      bufferProcessing: false,
      onwrite: [Function: bound onwrite],
      writecb: null,
      writelen: 0,
      afterWriteTickInfo: null,
      buffered: [],
      bufferedIndex: 0,
      allBuffers: true,
      allNoop: true,
      pendingcb: 0,
      constructed: true,
      prefinished: false,
      errorEmitted: false,
      emitClose: true,
      autoDestroy: true,
      errored: null,
      closed: false,
      closeEmitted: false,
      [Symbol(kOnFinished)]: []
    },
    _events: [Object: null prototype] {
      response: [Function: handleResponse],
      error: [Function: handleRequestError]
    },
    _eventsCount: 2,
    _maxListeners: undefined,
    _options: {
      maxRedirects: 21,
      maxBodyLength: 10485760,
      protocol: 'https:',
      path: '/p/zhejiang/Topic/topic/platformapi/api/v1/records/sign',
      method: 'POST',
      headers: {
        Accept: 'application/json, text/plain, */*',
        'Content-Type': 'application/json;charset=utf-8',
        Referer: 'https://zhoukou.xueanquan.com/login.html',
        Cookie: 'RecordLoginInput_20083=tianshufang0702; SafeApp=true; ServerSide=https://zhoukou.xueanquan.com; UserID=1090C0320E87D5E555FDC787826B298E; _UCodeStr={%0d%0a  "Grade": 11,%0d%0a  "ClassRoom": 1088163,%0d%0a  "CityCode": 190032%0d%0a};',
        'User-Agent': 'axios/0.21.1',
        'Content-Length': 26
      },
      agent: undefined,
      agents: { http: undefined, https: undefined },
      auth: undefined,
      hostname: 'huodongapi.xueanquan.com',
      port: null,
      nativeProtocols: {
        'http:': {
          _connectionListener: [Function: connectionListener],
          METHODS: [
            'ACL',         'BIND',       'CHECKOUT',
            'CONNECT',     'COPY',       'DELETE',
            'GET',         'HEAD',       'LINK',
            'LOCK',        'M-SEARCH',   'MERGE',
            'MKACTIVITY',  'MKCALENDAR', 'MKCOL',
            'MOVE',        'NOTIFY',     'OPTIONS',
            'PATCH',       'POST',       'PROPFIND',
            'PROPPATCH',   'PURGE',      'PUT',
            'REBIND',      'REPORT',     'SEARCH',
            'SOURCE',      'SUBSCRIBE',  'TRACE',
            'UNBIND',      'UNLINK',     'UNLOCK',
            'UNSUBSCRIBE'
          ],
          STATUS_CODES: {
            '100': 'Continue',
            '101': 'Switching Protocols',
            '102': 'Processing',
            '103': 'Early Hints',
            '200': 'OK',
            '201': 'Created',
            '202': 'Accepted',
            '203': 'Non-Authoritative Information',
            '204': 'No Content',
            '205': 'Reset Content',
            '206': 'Partial Content',
            '207': 'Multi-Status',
            '208': 'Already Reported',
            '226': 'IM Used',
            '300': 'Multiple Choices',
            '301': 'Moved Permanently',
            '302': 'Found',
            '303': 'See Other',
            '304': 'Not Modified',
            '305': 'Use Proxy',
            '307': 'Temporary Redirect',
            '308': 'Permanent Redirect',
            '400': 'Bad Request',
            '401': 'Unauthorized',
            '402': 'Payment Required',
            '403': 'Forbidden',
            '404': 'Not Found',
            '405': 'Method Not Allowed',
            '406': 'Not Acceptable',
            '407': 'Proxy Authentication Required',
            '408': 'Request Timeout',
            '409': 'Conflict',
            '410': 'Gone',
            '411': 'Length Required',
            '412': 'Precondition Failed',
            '413': 'Payload Too Large',
            '414': 'URI Too Long',
            '415': 'Unsupported Media Type',
            '416': 'Range Not Satisfiable',
            '417': 'Expectation Failed',
            '418': "I'm a Teapot",
            '421': 'Misdirected Request',
            '422': 'Unprocessable Entity',
            '423': 'Locked',
            '424': 'Failed Dependency',
            '425': 'Too Early',
            '426': 'Upgrade Required',
            '428': 'Precondition Required',
            '429': 'Too Many Requests',
            '431': 'Request Header Fields Too Large',
            '451': 'Unavailable For Legal Reasons',
            '500': 'Internal Server Error',
            '501': 'Not Implemented',
            '502': 'Bad Gateway',
            '503': 'Service Unavailable',
            '504': 'Gateway Timeout',
            '505': 'HTTP Version Not Supported',
            '506': 'Variant Also Negotiates',
            '507': 'Insufficient Storage',
            '508': 'Loop Detected',
            '509': 'Bandwidth Limit Exceeded',
            '510': 'Not Extended',
            '511': 'Network Authentication Required'
          },
          Agent: [Function: Agent] { defaultMaxSockets: Infinity },
          ClientRequest: [Function: ClientRequest],
          IncomingMessage: [Function: IncomingMessage],
          OutgoingMessage: [Function: OutgoingMessage],
          Server: [Function: Server],
          ServerResponse: [Function: ServerResponse],
          createServer: [Function: createServer],
          validateHeaderName: [Function: __node_internal_],
          validateHeaderValue: [Function: __node_internal_],
          get: [Function: get],
          request: [Function: request],
          maxHeaderSize: [Getter],
          globalAgent: [Getter/Setter]
        },
        'https:': {
          Agent: [Function: Agent],
          globalAgent: Agent {
            _events: [Object: null prototype],
            _eventsCount: 2,
            _maxListeners: undefined,
            defaultPort: 443,
            protocol: 'https:',
            options: [Object: null prototype],
            requests: [Object: null prototype] {},
            sockets: [Object: null prototype],
            freeSockets: [Object: null prototype] {},
            keepAliveMsecs: 1000,
            keepAlive: false,
            maxSockets: Infinity,
            maxFreeSockets: 256,
            scheduling: 'lifo',
            maxTotalSockets: Infinity,
            totalSocketCount: 1,
            maxCachedSessions: 100,
            _sessionCache: [Object],
            [Symbol(kCapture)]: false
          },
          Server: [Function: Server],
          createServer: [Function: createServer],
          get: [Function: get],
          request: [Function: request]
        }
      },
      pathname: '/p/zhejiang/Topic/topic/platformapi/api/v1/records/sign'
    },
    _ended: false,
    _ending: true,
    _redirectCount: 0,
    _redirects: [],
    _requestBodyLength: 26,
    _requestBodyBuffers: [
      {
        data: Buffer(26) [Uint8Array] [
          123,  34, 115, 112, 101,  99, 105,
           97, 108,  73, 100,  34,  58,  54,
           54,  51,  44,  34, 115, 116, 101,
          112,  34,  58,  50, 125
        ],
        encoding: undefined
      }
    ],
    _onNativeResponse: [Function (anonymous)],
    _currentRequest: <ref *2> ClientRequest {
      _events: [Object: null prototype] {
        response: [Function: bound onceWrapper] {
          listener: [Function (anonymous)]
        },
        abort: [Function (anonymous)],
        aborted: [Function (anonymous)],
        connect: [Function (anonymous)],
        error: [Function (anonymous)],
        socket: [Function (anonymous)],
        timeout: [Function (anonymous)]
      },
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: true,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: null,
      _hasBody: true,
      _trailer: '',
      finished: false,
      _headerSent: true,
      _closed: false,
      socket: <ref *3> TLSSocket {
        _tlsOptions: {
          allowHalfOpen: undefined,
          pipe: false,
          secureContext: SecureContext { context: SecureContext {} },
          isServer: false,
          requestCert: true,
          rejectUnauthorized: true,
          session: Buffer(2086) [Uint8Array] [
             48, 130,   8,  34,   2,   1,   1,   2,   2,   3,   3,   4,
              2, 192,  47,   4,  32, 144,  20,  90, 123, 183, 173, 174,
            253, 251, 107, 162, 227,   6,  97, 175,  32,  67,  60, 121,
             49, 226,  22, 113, 156, 103, 156,   0,  37,  79,  94, 215,
             75,   4,  48,  42, 203, 248, 220, 198, 149, 253,   7, 133,
            119, 223, 254, 164, 203,  34,  62, 161,  86,  55, 201,  86,
             31,  15, 255, 241,  40,   0, 132, 124, 192, 168, 108, 126,
            143,  37,  32,  75, 104, 163,  28, 218, 217, 121,  13, 216,
             73, 206, 159, 161,
            ... 1986 more items
          ],
          ALPNProtocols: undefined,
          requestOCSP: undefined,
          enableTrace: undefined,
          pskCallback: undefined,
          highWaterMark: undefined,
          onread: undefined,
          signal: undefined
        },
        _secureEstablished: false,
        _securePending: false,
        _newSessionPending: false,
        _controlReleased: true,
        secureConnecting: true,
        _SNICallback: null,
        servername: null,
        alpnProtocol: null,
        authorized: false,
        authorizationError: null,
        encrypted: true,
        _events: [Object: null prototype] {
          close: [
            [Function: onSocketCloseDestroySSL],
            [Function],
            [Function: onClose],
            [Function: socketCloseListener]
          ],
          end: [ [Function: onConnectEnd], [Function: onReadableStreamEnd] ],
          newListener: [Function: keylogNewListener],
          secure: [Function: onConnectSecure],
          session: [Function (anonymous)],
          free: [Function: onFree],
          timeout: [Function: onTimeout],
          agentRemove: [Function: onRemove],
          error: [Function: socketErrorListener],
          drain: [Function: ondrain]
        },
        _eventsCount: 10,
        connecting: false,
        _hadError: true,
        _parent: null,
        _host: 'huodongapi.xueanquan.com',
        _readableState: ReadableState {
          objectMode: false,
          highWaterMark: 16384,
          buffer: BufferList { head: null, tail: null, length: 0 },
          length: 0,
          pipes: [],
          flowing: true,
          ended: false,
          endEmitted: false,
          reading: true,
          constructed: true,
          sync: false,
          needReadable: true,
          emittedReadable: false,
          readableListening: false,
          resumeScheduled: false,
          errorEmitted: true,
          emitClose: false,
          autoDestroy: true,
          destroyed: true,
          errored: [Circular *1],
          closed: true,
          closeEmitted: true,
          defaultEncoding: 'utf8',
          awaitDrainWriters: null,
          multiAwaitDrain: false,
          readingMore: false,
          dataEmitted: false,
          decoder: null,
          encoding: null,
          [Symbol(kPaused)]: false
        },
        _maxListeners: undefined,
        _writableState: WritableState {
          objectMode: false,
          highWaterMark: 16384,
          finalCalled: false,
          needDrain: false,
          ending: false,
          ended: false,
          finished: false,
          destroyed: true,
          decodeStrings: false,
          defaultEncoding: 'utf8',
          length: 577,
          writing: true,
          corked: 0,
          sync: false,
          bufferProcessing: false,
          onwrite: [Function: bound onwrite],
          writecb: [Function (anonymous)],
          writelen: 577,
          afterWriteTickInfo: null,
          buffered: [],
          bufferedIndex: 0,
          allBuffers: true,
          allNoop: true,
          pendingcb: 1,
          constructed: true,
          prefinished: false,
          errorEmitted: true,
          emitClose: false,
          autoDestroy: true,
          errored: [Circular *1],
          closed: true,
          closeEmitted: true,
          [Symbol(kOnFinished)]: []
        },
        allowHalfOpen: false,
        _sockname: null,
        _pendingData: null,
        _pendingEncoding: '',
        server: undefined,
        _server: null,
        ssl: null,
        _requestCert: true,
        _rejectUnauthorized: true,
        parser: null,
        _httpMessage: [Circular *2],
        [Symbol(res)]: TLSWrap {
          _parent: TCP {
            reading: [Getter/Setter],
            onconnection: null,
            [Symbol(owner_symbol)]: [Circular *3],
            [Symbol(handle_onclose)]: [Function: done]
          },
          _parentWrap: undefined,
          _secureContext: SecureContext { context: SecureContext {} },
          reading: true,
          onkeylog: [Function: onkeylog],
          onhandshakestart: {},
          onhandshakedone: [Function (anonymous)],
          onocspresponse: [Function: onocspresponse],
          onnewsession: [Function: onnewsessionclient],
          onerror: [Function: onerror],
          [Symbol(owner_symbol)]: [Circular *3]
        },
        [Symbol(verified)]: false,
        [Symbol(pendingSession)]: null,
        [Symbol(async_id_symbol)]: 799,
        [Symbol(kHandle)]: null,
        [Symbol(kSetNoDelay)]: false,
        [Symbol(lastWriteQueueSize)]: 577,
        [Symbol(timeout)]: null,
        [Symbol(kBuffer)]: null,
        [Symbol(kBufferCb)]: null,
        [Symbol(kBufferGen)]: null,
        [Symbol(kCapture)]: false,
        [Symbol(kBytesRead)]: 0,
        [Symbol(kBytesWritten)]: 577,
        [Symbol(connect-options)]: {
          rejectUnauthorized: true,
          ciphers: 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA',
          checkServerIdentity: [Function: checkServerIdentity],
          minDHSize: 1024,
          session: Buffer(2086) [Uint8Array] [
             48, 130,   8,  34,   2,   1,   1,   2,   2,   3,   3,   4,
              2, 192,  47,   4,  32, 144,  20,  90, 123, 183, 173, 174,
            253, 251, 107, 162, 227,   6,  97, 175,  32,  67,  60, 121,
             49, 226,  22, 113, 156, 103, 156,   0,  37,  79,  94, 215,
             75,   4,  48,  42, 203, 248, 220, 198, 149, 253,   7, 133,
            119, 223, 254, 164, 203,  34,  62, 161,  86,  55, 201,  86,
             31,  15, 255, 241,  40,   0, 132, 124, 192, 168, 108, 126,
            143,  37,  32,  75, 104, 163,  28, 218, 217, 121,  13, 216,
             73, 206, 159, 161,
            ... 1986 more items
          ],
          maxRedirects: 21,
          maxBodyLength: 10485760,
          protocol: 'https:',
          path: null,
          method: 'POST',
          headers: {
            Accept: 'application/json, text/plain, */*',
            'Content-Type': 'application/json;charset=utf-8',
            Referer: 'https://zhoukou.xueanquan.com/login.html',
            Cookie: 'RecordLoginInput_20083=tianshufang0702; SafeApp=true; ServerSide=https://zhoukou.xueanquan.com; UserID=1090C0320E87D5E555FDC787826B298E; _UCodeStr={%0d%0a  "Grade": 11,%0d%0a  "ClassRoom": 1088163,%0d%0a  "CityCode": 190032%0d%0a};',
            'User-Agent': 'axios/0.21.1',
            'Content-Length': 26
          },
          agent: undefined,
          agents: { http: undefined, https: undefined },
          auth: undefined,
          hostname: 'huodongapi.xueanquan.com',
          port: 443,
          nativeProtocols: { 'http:': [Object], 'https:': [Object] },
          pathname: '/p/zhejiang/Topic/topic/platformapi/api/v1/records/sign',
          _defaultAgent: Agent {
            _events: [Object: null prototype],
            _eventsCount: 2,
            _maxListeners: undefined,
            defaultPort: 443,
            protocol: 'https:',
            options: [Object: null prototype],
            requests: [Object: null prototype] {},
            sockets: [Object: null prototype],
            freeSockets: [Object: null prototype] {},
            keepAliveMsecs: 1000,
            keepAlive: false,
            maxSockets: Infinity,
            maxFreeSockets: 256,
            scheduling: 'lifo',
            maxTotalSockets: Infinity,
            totalSocketCount: 1,
            maxCachedSessions: 100,
            _sessionCache: [Object],
            [Symbol(kCapture)]: false
          },
          host: 'huodongapi.xueanquan.com',
          servername: 'huodongapi.xueanquan.com',
          _agentKey: 'huodongapi.xueanquan.com:443:::::::::::::::::::::',
          encoding: null,
          singleUse: true
        }
      },
      _header: 'POST /p/zhejiang/Topic/topic/platformapi/api/v1/records/sign HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'Content-Type: application/json;charset=utf-8\r\n' +
        'Referer: https://zhoukou.xueanquan.com/login.html\r\n' +
        'Cookie: RecordLoginInput_20083=tianshufang0702; SafeApp=true; ServerSide=https://zhoukou.xueanquan.com; UserID=1090C0320E87D5E555FDC787826B298E; _UCodeStr={%0d%0a  "Grade": 11,%0d%0a  "ClassRoom": 1088163,%0d%0a  "CityCode": 190032%0d%0a};\r\n' +
        'User-Agent: axios/0.21.1\r\n' +
        'Content-Length: 26\r\n' +
        'Host: huodongapi.xueanquan.com\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: Agent {
        _events: [Object: null prototype] {
          free: [Function (anonymous)],
          newListener: [Function: maybeEnableKeylog]
        },
        _eventsCount: 2,
        _maxListeners: undefined,
        defaultPort: 443,
        protocol: 'https:',
        options: [Object: null prototype] { path: null },
        requests: [Object: null prototype] {},
        sockets: [Object: null prototype] {
          'huodongapi.xueanquan.com:443:::::::::::::::::::::': [ [TLSSocket] ]
        },
        freeSockets: [Object: null prototype] {},
        keepAliveMsecs: 1000,
        keepAlive: false,
        maxSockets: Infinity,
        maxFreeSockets: 256,
        scheduling: 'lifo',
        maxTotalSockets: Infinity,
        totalSocketCount: 1,
        maxCachedSessions: 100,
        _sessionCache: {
          map: {
            'zhoukou.xueanquan.com:443:::::::::::::::::::::': [Buffer [Uint8Array]],
            'huodongapi.xueanquan.com:443:::::::::::::::::::::': [Buffer [Uint8Array]]
          },
          list: [
            'zhoukou.xueanquan.com:443:::::::::::::::::::::',
            'huodongapi.xueanquan.com:443:::::::::::::::::::::'
          ]
        },
        [Symbol(kCapture)]: false
      },
      socketPath: undefined,
      method: 'POST',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: '/p/zhejiang/Topic/topic/platformapi/api/v1/records/sign',
      _ended: false,
      res: null,
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'huodongapi.xueanquan.com',
      protocol: 'https:',
      _redirectable: [Circular *4],
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype] {
        accept: [ 'Accept', 'application/json, text/plain, */*' ],
        'content-type': [ 'Content-Type', 'application/json;charset=utf-8' ],
        referer: [ 'Referer', 'https://zhoukou.xueanquan.com/login.html' ],
        cookie: [
          'Cookie',
          'RecordLoginInput_20083=tianshufang0702; SafeApp=true; ServerSide=https://zhoukou.xueanquan.com; UserID=1090C0320E87D5E555FDC787826B298E; _UCodeStr={%0d%0a  "Grade": 11,%0d%0a  "ClassRoom": 1088163,%0d%0a  "CityCode": 190032%0d%0a};'
        ],
        'user-agent': [ 'User-Agent', 'axios/0.21.1' ],
        'content-length': [ 'Content-Length', 26 ],
        host: [ 'Host', 'huodongapi.xueanquan.com' ]
      }
    },
    _currentUrl: 'https://huodongapi.xueanquan.com/p/zhejiang/Topic/topic/platformapi/api/v1/records/sign',
    [Symbol(kCapture)]: false
  },
  response: undefined,
  isAxiosError: true,
  toJSON: [Function: toJSON]
}
sakurayun commented 3 years ago

这是我完整的配置文件


/* === 个人信息 === */

// 获取 accounts 请访问并登录
// https://wenzhou.xueanquan.com/EduAdmin/Home/Index#ClassManagement_Manage
// [...document.querySelectorAll('div.gridTbody > table > tbody > tr')].map(v => v.getAttribute("rel"))
// 在控制台键入以上 js 代码取账号列表并粘贴到以下声明中。
let accounts = ['28609880/chenyukuang680', '28631555/xiamengyuan276', '30348876/chukangxin576', '2021551918/guoyankun3819', '2052798720/zhangjiahao9529', '2077967563/chengjiahao9801959', '2078189416/songhan5912', '2078272535/tianjing3371', '2078967338/jiangyuqing5871', '2079027574/wangwenhao4345514', '2079405980/tianshufang0702', '2079416934/lianxin8787', '2079418495/kuangwenbo2707', '2081443927/gaoshiyang0864', '2081444018/weiyang6494', '2082204607/chengdongling6401', '2084680964/malele5081', '2085489884/liyonghao6910', '2087089597/jiangxiaokai9457', '2087299139/zhangchenhe0571', '2087377344/yuanyangkun0894', '2087585798/liyajie4253', '2087616170/rensiyu9539', '2087966591/lishiyu2487','2087973209/chenbin3370131', '2088088974/wangshuya1417', '2088168046/zhuyujie6986', '2088168078/zhangchenxuan4952', '2088287671/zhushihua8190', '2088319520/duanxufei6068', '2088355582/lizihao6279601', '2088355607/liuyinsong4902', '2088602729/wuruiying1081', '2088602749/liujiaxuan4480', '2088602752/dingyufeng4361', '2088603090/fengkaiyue2543', '2088630981/zhouqiaoyu7122', '2088632393/wangsisi4875', '2088902678/zhangyueyue9061', '2088902721/panxiangwei4247', '2089131093/xuehaojie5753', '2089167857/wangjuanjuan3230', '2089169094/jieyansen4905', '2089505719/gaohuilin3189', '2089505731/wanghuijie4851', '2089505747/gaoqiwen0992', '2089591800/xiaomanman3083', '2089625093/zhangruihao5519', '2089750594/zhangyi2033341','2090179832/zhangmin3571598', '2090272287/mengyikai7263', '2091266810/kuangshuangle', '2091285128/wangchenyu6483542', '2091288265/liuxu1821', '2091288608/zhangyifang7936', '2091295623/liniuniu1962', '2091302801/niuqinjie7553', '2091313661/wanghuanhuan3080', '2091313694/zhouliting1584', '2091354188/wangyan8704050', '2091366485/wangqimiao6320', '2091366597/liusimeng0706', '2091366978/niemenghan5490', '2091367101/masenwang3416', '2091367159/wangwenbo4883724', '2091367225/wangxinyu9738824', '2091367231/tianfeng6077', '2091367246/zhangyue42424242', '2091368392/liuhaibo8613', '2091374263/wangchenyang8671', '2094413869/shaohuijie9730', '2099542407/wangyaohui1536', '2099542436/yancancan7437', '2100264875/fushihui5493','2100266203/xiabingjie4002', '2100354808/jiangwenhao5711', '2107181932/zhangzhiling7931', '2107182056/shijian9715', '2107310662/shiwuyue9954', '2115223024/yangshun4768', '2115449647/wangqikai7639', '2128782428/wangmengjie3388905', '2129037194/zhanggujie2232', '2130229501/yanchunhui2062', '2131039114/yuanmanru9021', '2131044951/zhangtiantian4295'];

// 需要替换为有管理权限的账号 Cookie,请访问下述地址并登录,按 F12 后刷新,在 Network 中复制 Cookie 并填入以下声明。
// https://wenzhou.xueanquan.com/EduAdmin/Home/  ‘’
let adminCookie = "dwz_theme=azure; accessId=dd39b150-a934-11e9-b073-e9b8d9c630e7; ASP.NET_SessionId=aeqr2b1x3yt1cegztdcwklzl; href=https%3A%2F%2Fzhoukou.xueanquan.com%2FMainPage.html; qimo_xstKeywords_dd39b150-a934-11e9-b073-e9b8d9c630e7=; _UCodeStr={%0d%0a  ‘Grade’: 11,%0d%0a  ‘ClassRoom’: 1088163,%0d%0a  ‘CityCode’: 190032%0d%0a}; SafeApp=true; SpecialGID=66fbd27c488b421dbbcdc5a6c4da374e; _UStr=%7bret%3a1%2cdata%3a%7bUserId%3a%273107A0C41C919CBDD30053E3C15C4E60%27%2cUserName%3a%27shiwuyue9954%27%2cTrueName%3a%27%e7%9f%b3%e5%90%b4%e5%b2%b3%27%2cSex%3a%271%27%2cSchoolID%3a%27332263271%27%2cGrade%3a%2711%27%2cClassRoom%3a%271088163%27%2cUserType%3a%270%27%2cPrvCode%3a%2719%27%2cCityCode%3a%27190032%27%2cCountryId%3a%27190032010%27%2cSchoolName%3a%27%e9%a1%b9%e5%9f%8e%e5%b8%82%e7%ac%ac%e4%ba%8c%e9%ab%98%e7%ba%a7%e4%b8%ad%e5%ad%a6%27%2cPrvName%3a%27%e6%b2%b3%e5%8d%97%e7%9c%81%27%2cCityName%3a%27%e5%91%a8%e5%8f%a3%e5%b8%82%27%2cCountryName%3a%27%e9%a1%b9%e5%9f%8e%e5%b8%82%27%2cregionalAuthority%3a%270%27%2cSchoolProperty%3a%271%27%2cLengthOfSchooling%3a%270%27%2cComeFrom%3a%2720187%27%2cEptName%3a%27%e5%91%a8%e5%8f%a3%e5%b8%82%27%2cJtUrl%3a%27%2fJiaTing%2fJtMyHomeWork.html%27%2cEplatformUrl%3a%27https%3a%2f%2fzhoukou.xueanquan.com%27%7d%7d; UserID=3724B2581C8D2325135FC80B3456D4A6; ServerSide=https://zhoukou.xueanquan.com; _UserID=XglLPYuEQFvqZg5zeO8D0W23OsgpiZ8b0CnACfUEyko=; RiskApp=true; PeiXun_UserID=E54835AE8780E0A9E5B14177463DEF91; Training=true; qimo_seokeywords_dd39b150-a934-11e9-b073-e9b8d9c630e7=; dwz_theme=azure; pageViewNum=27";

/* === 假期活动 === */
// 如 https://huodong.xueanquan.com/summer2021/summer_one.html
let holiday = {};

holiday.schoolYear = 2021; // 打开专题活动页,按 F12 调出 Console,输入 schoolYear、semester 取该专题活动的 schoolYear、semester。
holiday.semester = 2;
holiday.steps = ['安全知识', '安全素养', '家长扫码']; // 不同专题活动步骤不同,大部分是两步——看视频和答问卷——请按照实际情况修改。

/* === 专题活动 === */
// 如 https://huodong.xueanquan.com/2021fzjz/index.html
let special = {};

special.specialId = 663;
special.steps = ['学知识', '问卷签到']; // 不同专题活动步骤不同,大部分是两步——看视频和答问卷——请按照实际情况修改。

/* === 安全学习 === */
let skill = {};

// https://wenzhou.xueanquan.com/JiaTing/EscapeSkill/SeeVideo.aspx?gid=${gid}&li=${courseid}
// 在对应的安全学习页源代码第 87 行取 videoid,gid,courseid,第 542 行取 workid,fid,title。
skill.videoid = 23126;
skill.gid = 789;
skill.courseid = 811;
skill.workid = 823837;
skill.fid = 314;
skill.title = "网络是把“双刃剑”";

/* === 执行操作 === */
let methods = {};
methods.anquanxuexi = 0; // 安全学习
methods.zhuantihuodong = 1; // 专题活动
methods.jiaqihuodong = 2; // 假期活动
methods.listInfo = 3;

let willDo = methods.zhuantihuodong;

// 与你无关的东西
exports.accounts = accounts;
exports.adminCookie = adminCookie;
exports.holiday = holiday;
exports.special = special;
exports.skill = skill;
exports.willDo = willDo;
sakurayun commented 3 years ago

会出现


'''
==========================
即将开始对 85 个账号进行自动任务。
==========================
正在处理 28631555 xiamengyuan276
登录返回 200 1 夏梦缘 AEE00519C6700585BC22CD554B4CD772
学知识 200 false 请先登录
问卷签到 200 false 请先登录
==========================
正在处理 30348876 chukangxin576
登录返回 200 1 褚康新 A5AA3323A700D94C4E0E96381F66710D
学知识 200 false 请先登录
问卷签到 200 false 请先登录
==========================
正在处理 2021551918 guoyankun3819
登录返回 200 1 郭炎坤 5E934867668283F57A520EC683E06A0F
学知识 200 false 请先登录
问卷签到 200 false 请先登录
==========================
正在处理 2052798720 zhangjiahao9529
登录返回 200 1 张家豪 2ECBF61A0960754564A7767E85BAAC8E
学知识 200 false 请先登录
问卷签到 200 false 请先登录
==========================
正在处理 2077967563 chengjiahao9801959
"""
sakurayun commented 3 years ago

现在cookie报错问题解决了,但是会频繁出现 学知识 200 false 请先登录 问卷签到 200 false 请先登录 这种情况

sakurayun commented 3 years ago
登录返回 200 1 靳阳阳 24112D8AE09F654A
node:internal/process/promises:246
          triggerUncaughtException(err, true /* fromPromise */);
          ^

<ref *1> Error: connect ETIMEDOUT 112.17.39.87:443
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1146:16) {
  errno: -4039,
  code: 'ETIMEDOUT',
  syscall: 'connect',
  address: '112.17.39.87',
  port: 443,
  config: {
    url: 'https://huodongapi.xueanquan.com/p/henan/Topic/topic/platformapi/api/v1/records/sign',
    method: 'post',
    data: '{"specialId":663,"step":1}',
    headers: {
      Accept: 'application/json, text/plain, */*',
      'Content-Type': 'application/json;charset=utf-8',
      Referer: 'https://zhoukou.xueanquan.com/login.html',
      Cookie: 'RecordLoginInput_20083=jinyangyang8958; SafeApp=true; ServerSide=https://zhoukou.xueanquan.com; UserID=24112D8AE09F654A; _UCodeStr={%0d%0a  "Grade": 11,%0d%0a  "ClassRoom": 1088163,%0d%0a  "CityCode": 190032%0d%0a};',
      'User-Agent': 'axios/0.21.1',
      'Content-Length': 26
    },
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    adapter: [Function: httpAdapter],
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    validateStatus: [Function: validateStatus]
  },
  request: <ref *4> Writable {
    _writableState: WritableState {
      objectMode: false,
      highWaterMark: 16384,
      finalCalled: false,
      needDrain: false,
      ending: false,
      ended: false,
      finished: false,
      destroyed: false,
      decodeStrings: true,
      defaultEncoding: 'utf8',
      length: 0,
      writing: false,
      corked: 0,
      sync: true,
      bufferProcessing: false,
      onwrite: [Function: bound onwrite],
      writecb: null,
      writelen: 0,
      afterWriteTickInfo: null,
      buffered: [],
      bufferedIndex: 0,
      allBuffers: true,
      allNoop: true,
      pendingcb: 0,
      constructed: true,
      prefinished: false,
      errorEmitted: false,
      emitClose: true,
      autoDestroy: true,
      errored: null,
      closed: false,
      closeEmitted: false,
      [Symbol(kOnFinished)]: []
    },
    _events: [Object: null prototype] {
      response: [Function: handleResponse],
      error: [Function: handleRequestError]
    },
    _eventsCount: 2,
    _maxListeners: undefined,
    _options: {
      maxRedirects: 21,
      maxBodyLength: 10485760,
      protocol: 'https:',
      path: '/p/henan/Topic/topic/platformapi/api/v1/records/sign',
      method: 'POST',
      headers: {
        Accept: 'application/json, text/plain, */*',
        'Content-Type': 'application/json;charset=utf-8',
        Referer: 'https://zhoukou.xueanquan.com/login.html',
        Cookie: 'RecordLoginInput_20083=jinyangyang8958; SafeApp=true; ServerSide=https://zhoukou.xueanquan.com; UserID=24112D8AE09F654A; _UCodeStr={%0d%0a  "Grade": 11,%0d%0a  "ClassRoom": 1088163,%0d%0a  "CityCode": 190032%0d%0a};',
        'User-Agent': 'axios/0.21.1',
        'Content-Length': 26
      },
      agent: undefined,
      agents: { http: undefined, https: undefined },
      auth: undefined,
      hostname: 'huodongapi.xueanquan.com',
      port: null,
      nativeProtocols: {
        'http:': {
          _connectionListener: [Function: connectionListener],
          METHODS: [
            'ACL',         'BIND',       'CHECKOUT',
            'CONNECT',     'COPY',       'DELETE',
            'GET',         'HEAD',       'LINK',
            'LOCK',        'M-SEARCH',   'MERGE',
            'MKACTIVITY',  'MKCALENDAR', 'MKCOL',
            'MOVE',        'NOTIFY',     'OPTIONS',
            'PATCH',       'POST',       'PROPFIND',
            'PROPPATCH',   'PURGE',      'PUT',
            'REBIND',      'REPORT',     'SEARCH',
            'SOURCE',      'SUBSCRIBE',  'TRACE',
            'UNBIND',      'UNLINK',     'UNLOCK',
            'UNSUBSCRIBE'
          ],
          STATUS_CODES: {
            '100': 'Continue',
            '101': 'Switching Protocols',
            '102': 'Processing',
            '103': 'Early Hints',
            '200': 'OK',
            '201': 'Created',
            '202': 'Accepted',
            '203': 'Non-Authoritative Information',
            '204': 'No Content',
            '205': 'Reset Content',
            '206': 'Partial Content',
            '207': 'Multi-Status',
            '208': 'Already Reported',
            '226': 'IM Used',
            '300': 'Multiple Choices',
            '301': 'Moved Permanently',
            '302': 'Found',
            '303': 'See Other',
            '304': 'Not Modified',
            '305': 'Use Proxy',
            '307': 'Temporary Redirect',
            '308': 'Permanent Redirect',
            '400': 'Bad Request',
            '401': 'Unauthorized',
            '402': 'Payment Required',
            '403': 'Forbidden',
            '404': 'Not Found',
            '405': 'Method Not Allowed',
            '406': 'Not Acceptable',
            '407': 'Proxy Authentication Required',
            '408': 'Request Timeout',
            '409': 'Conflict',
            '410': 'Gone',
            '411': 'Length Required',
            '412': 'Precondition Failed',
            '413': 'Payload Too Large',
            '414': 'URI Too Long',
            '415': 'Unsupported Media Type',
            '416': 'Range Not Satisfiable',
            '417': 'Expectation Failed',
            '418': "I'm a Teapot",
            '421': 'Misdirected Request',
            '422': 'Unprocessable Entity',
            '423': 'Locked',
            '424': 'Failed Dependency',
            '425': 'Too Early',
            '426': 'Upgrade Required',
            '428': 'Precondition Required',
            '429': 'Too Many Requests',
            '431': 'Request Header Fields Too Large',
            '451': 'Unavailable For Legal Reasons',
            '500': 'Internal Server Error',
            '501': 'Not Implemented',
            '502': 'Bad Gateway',
            '503': 'Service Unavailable',
            '504': 'Gateway Timeout',
            '505': 'HTTP Version Not Supported',
            '506': 'Variant Also Negotiates',
            '507': 'Insufficient Storage',
            '508': 'Loop Detected',
            '509': 'Bandwidth Limit Exceeded',
            '510': 'Not Extended',
            '511': 'Network Authentication Required'
          },
          Agent: [Function: Agent] { defaultMaxSockets: Infinity },
          ClientRequest: [Function: ClientRequest],
          IncomingMessage: [Function: IncomingMessage],
          OutgoingMessage: [Function: OutgoingMessage],
          Server: [Function: Server],
          ServerResponse: [Function: ServerResponse],
          createServer: [Function: createServer],
          validateHeaderName: [Function: __node_internal_],
          validateHeaderValue: [Function: __node_internal_],
          get: [Function: get],
          request: [Function: request],
          maxHeaderSize: [Getter],
          globalAgent: [Getter/Setter]
        },
        'https:': {
          Agent: [Function: Agent],
          globalAgent: Agent {
            _events: [Object: null prototype],
            _eventsCount: 2,
            _maxListeners: undefined,
            defaultPort: 443,
            protocol: 'https:',
            options: [Object: null prototype],
            requests: [Object: null prototype] {},
            sockets: [Object: null prototype],
            freeSockets: [Object: null prototype] {},
            keepAliveMsecs: 1000,
            keepAlive: false,
            maxSockets: Infinity,
            maxFreeSockets: 256,
            scheduling: 'lifo',
            maxTotalSockets: Infinity,
            totalSocketCount: 1,
            maxCachedSessions: 100,
            _sessionCache: [Object],
            [Symbol(kCapture)]: false
          },
          Server: [Function: Server],
          createServer: [Function: createServer],
          get: [Function: get],
          request: [Function: request]
        }
      },
      pathname: '/p/henan/Topic/topic/platformapi/api/v1/records/sign'
    },
    _ended: false,
    _ending: true,
    _redirectCount: 0,
    _redirects: [],
    _requestBodyLength: 26,
    _requestBodyBuffers: [
      {
        data: Buffer(26) [Uint8Array] [
          123,  34, 115, 112, 101,  99, 105,
           97, 108,  73, 100,  34,  58,  54,
           54,  51,  44,  34, 115, 116, 101,
          112,  34,  58,  49, 125
        ],
        encoding: undefined
      }
    ],
    _onNativeResponse: [Function (anonymous)],
    _currentRequest: <ref *2> ClientRequest {
      _events: [Object: null prototype] {
        response: [Function: bound onceWrapper] {
          listener: [Function (anonymous)]
        },
        abort: [Function (anonymous)],
        aborted: [Function (anonymous)],
        connect: [Function (anonymous)],
        error: [Function (anonymous)],
        socket: [Function (anonymous)],
        timeout: [Function (anonymous)]
      },
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: true,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: null,
      _hasBody: true,
      _trailer: '',
      finished: false,
      _headerSent: true,
      _closed: false,
      socket: <ref *3> TLSSocket {
        _tlsOptions: {
          allowHalfOpen: undefined,
          pipe: false,
          secureContext: SecureContext { context: SecureContext {} },
          isServer: false,
          requestCert: true,
          rejectUnauthorized: true,
          session: undefined,
          ALPNProtocols: undefined,
          requestOCSP: undefined,
          enableTrace: undefined,
          pskCallback: undefined,
          highWaterMark: undefined,
          onread: undefined,
          signal: undefined
        },
        _secureEstablished: false,
        _securePending: false,
        _newSessionPending: false,
        _controlReleased: true,
        secureConnecting: true,
        _SNICallback: null,
        servername: null,
        alpnProtocol: null,
        authorized: false,
        authorizationError: null,
        encrypted: true,
        _events: [Object: null prototype] {
          close: [
            [Function: onSocketCloseDestroySSL],
            [Function],
            [Function: onClose],
            [Function: socketCloseListener]
          ],
          end: [ [Function: onConnectEnd], [Function: onReadableStreamEnd] ],
          newListener: [Function: keylogNewListener],
          connect: [ [Function], [Function], [Function] ],
          secure: [Function: onConnectSecure],
          session: [Function (anonymous)],
          free: [Function: onFree],
          timeout: [Function: onTimeout],
          agentRemove: [Function: onRemove],
          error: [Function: socketErrorListener],
          drain: [Function: ondrain]
        },
        _eventsCount: 11,
        connecting: false,
        _hadError: true,
        _parent: null,
        _host: 'huodongapi.xueanquan.com',
        _readableState: ReadableState {
          objectMode: false,
          highWaterMark: 16384,
          buffer: BufferList { head: null, tail: null, length: 0 },
          length: 0,
          pipes: [],
          flowing: true,
          ended: false,
          endEmitted: false,
          reading: true,
          constructed: true,
          sync: false,
          needReadable: true,
          emittedReadable: false,
          readableListening: false,
          resumeScheduled: false,
          errorEmitted: true,
          emitClose: false,
          autoDestroy: true,
          destroyed: true,
          errored: [Circular *1],
          closed: true,
          closeEmitted: true,
          defaultEncoding: 'utf8',
          awaitDrainWriters: null,
          multiAwaitDrain: false,
          readingMore: false,
          dataEmitted: false,
          decoder: null,
          encoding: null,
          [Symbol(kPaused)]: false
        },
        _maxListeners: undefined,
        _writableState: WritableState {
          objectMode: false,
          highWaterMark: 16384,
          finalCalled: false,
          needDrain: false,
          ending: false,
          ended: false,
          finished: false,
          destroyed: true,
          decodeStrings: false,
          defaultEncoding: 'utf8',
          length: 558,
          writing: true,
          corked: 0,
          sync: false,
          bufferProcessing: false,
          onwrite: [Function: bound onwrite],
          writecb: [Function (anonymous)],
          writelen: 558,
          afterWriteTickInfo: null,
          buffered: [],
          bufferedIndex: 0,
          allBuffers: true,
          allNoop: true,
          pendingcb: 1,
          constructed: true,
          prefinished: false,
          errorEmitted: true,
          emitClose: false,
          autoDestroy: true,
          errored: [Circular *1],
          closed: true,
          closeEmitted: true,
          [Symbol(kOnFinished)]: []
        },
        allowHalfOpen: false,
        _sockname: null,
        _pendingData: [
          {
            chunk: 'POST /p/henan/Topic/topic/platformapi/api/v1/records/sign HTTP/1.1\r\n' +
              'Accept: application/json, text/plain, */*\r\n' +
              'Content-Type: application/json;charset=utf-8\r\n' +
              'Referer: https://zhoukou.xueanquan.com/login.html\r\n' +
              'Cookie: RecordLoginInput_20083=jinyangyang8958; SafeApp=true; ServerSide=https://zhoukou.xueanquan.com; UserID=24112D8AE09F654A; _UCodeStr={%0d%0a  "Grade": 11,%0d%0a  "ClassRoom": 1088163,%0d%0a  "CityCode": 190032%0d%0a};\r\n' +
              'User-Agent: axios/0.21.1\r\n' +
              'Content-Length: 26\r\n' +
              'Host: huodongapi.xueanquan.com\r\n' +
              'Connection: close\r\n' +
              '\r\n',
            encoding: 'latin1',
            callback: [Function: nop]
          },
          {
            chunk: [Buffer [Uint8Array]],
            encoding: 'buffer',
            callback: [Function (anonymous)]
          },
          allBuffers: false
        ],
        _pendingEncoding: '',
        server: undefined,
        _server: null,
        ssl: null,
        _requestCert: true,
        _rejectUnauthorized: true,
        parser: null,
        _httpMessage: [Circular *2],
        [Symbol(res)]: TLSWrap {
          _parent: TCP {
            reading: [Getter/Setter],
            onconnection: null,
            [Symbol(owner_symbol)]: [Circular *3],
            [Symbol(handle_onclose)]: [Function: done]
          },
          _parentWrap: undefined,
          _secureContext: SecureContext { context: SecureContext {} },
          reading: false,
          onkeylog: [Function: onkeylog],
          onhandshakestart: {},
          onhandshakedone: [Function (anonymous)],
          onocspresponse: [Function: onocspresponse],
          onnewsession: [Function: onnewsessionclient],
          onerror: [Function: onerror],
          [Symbol(owner_symbol)]: [Circular *3]
        },
        [Symbol(verified)]: false,
        [Symbol(pendingSession)]: null,
        [Symbol(async_id_symbol)]: 77,
        [Symbol(kHandle)]: null,
        [Symbol(kSetNoDelay)]: false,
        [Symbol(lastWriteQueueSize)]: 0,
        [Symbol(timeout)]: null,
        [Symbol(kBuffer)]: null,
        [Symbol(kBufferCb)]: null,
        [Symbol(kBufferGen)]: null,
        [Symbol(kCapture)]: false,
        [Symbol(kBytesRead)]: 0,
        [Symbol(kBytesWritten)]: 0,
        [Symbol(connect-options)]: {
          rejectUnauthorized: true,
          ciphers: 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA',
          checkServerIdentity: [Function: checkServerIdentity],
          minDHSize: 1024,
          maxRedirects: 21,
          maxBodyLength: 10485760,
          protocol: 'https:',
          path: null,
          method: 'POST',
          headers: {
            Accept: 'application/json, text/plain, */*',
            'Content-Type': 'application/json;charset=utf-8',
            Referer: 'https://zhoukou.xueanquan.com/login.html',
            Cookie: 'RecordLoginInput_20083=jinyangyang8958; SafeApp=true; ServerSide=https://zhoukou.xueanquan.com; UserID=24112D8AE09F654A; _UCodeStr={%0d%0a  "Grade": 11,%0d%0a  "ClassRoom": 1088163,%0d%0a  "CityCode": 190032%0d%0a};',
            'User-Agent': 'axios/0.21.1',
            'Content-Length': 26
          },
          agent: undefined,
          agents: { http: undefined, https: undefined },
          auth: undefined,
          hostname: 'huodongapi.xueanquan.com',
          port: 443,
          nativeProtocols: { 'http:': [Object], 'https:': [Object] },
          pathname: '/p/henan/Topic/topic/platformapi/api/v1/records/sign',
          _defaultAgent: Agent {
            _events: [Object: null prototype],
            _eventsCount: 2,
            _maxListeners: undefined,
            defaultPort: 443,
            protocol: 'https:',
            options: [Object: null prototype],
            requests: [Object: null prototype] {},
            sockets: [Object: null prototype],
            freeSockets: [Object: null prototype] {},
            keepAliveMsecs: 1000,
            keepAlive: false,
            maxSockets: Infinity,
            maxFreeSockets: 256,
            scheduling: 'lifo',
            maxTotalSockets: Infinity,
            totalSocketCount: 1,
            maxCachedSessions: 100,
            _sessionCache: [Object],
            [Symbol(kCapture)]: false
          },
          host: 'huodongapi.xueanquan.com',
          servername: 'huodongapi.xueanquan.com',
          _agentKey: 'huodongapi.xueanquan.com:443:::::::::::::::::::::',
          encoding: null,
          singleUse: true
        }
      },
      _header: 'POST /p/henan/Topic/topic/platformapi/api/v1/records/sign HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'Content-Type: application/json;charset=utf-8\r\n' +
        'Referer: https://zhoukou.xueanquan.com/login.html\r\n' +
        'Cookie: RecordLoginInput_20083=jinyangyang8958; SafeApp=true; ServerSide=https://zhoukou.xueanquan.com; UserID=24112D8AE09F654A; _UCodeStr={%0d%0a  "Grade": 11,%0d%0a  "ClassRoom": 1088163,%0d%0a  "CityCode": 190032%0d%0a};\r\n' +
        'User-Agent: axios/0.21.1\r\n' +
        'Content-Length: 26\r\n' +
        'Host: huodongapi.xueanquan.com\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: Agent {
        _events: [Object: null prototype] {
          free: [Function (anonymous)],
          newListener: [Function: maybeEnableKeylog]
        },
        _eventsCount: 2,
        _maxListeners: undefined,
        defaultPort: 443,
        protocol: 'https:',
        options: [Object: null prototype] { path: null },
        requests: [Object: null prototype] {},
        sockets: [Object: null prototype] {
          'huodongapi.xueanquan.com:443:::::::::::::::::::::': [ [TLSSocket] ]
        },
        freeSockets: [Object: null prototype] {},
        keepAliveMsecs: 1000,
        keepAlive: false,
        maxSockets: Infinity,
        maxFreeSockets: 256,
        scheduling: 'lifo',
        maxTotalSockets: Infinity,
        totalSocketCount: 1,
        maxCachedSessions: 100,
        _sessionCache: {
          map: {
            'zhoukou.xueanquan.com:443:::::::::::::::::::::': [Buffer [Uint8Array]]
          },
          list: [ 'zhoukou.xueanquan.com:443:::::::::::::::::::::' ]
        },
        [Symbol(kCapture)]: false
      },
      socketPath: undefined,
      method: 'POST',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: '/p/henan/Topic/topic/platformapi/api/v1/records/sign',
      _ended: false,
      res: null,
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'huodongapi.xueanquan.com',
      protocol: 'https:',
      _redirectable: [Circular *4],
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype] {
        accept: [ 'Accept', 'application/json, text/plain, */*' ],
        'content-type': [ 'Content-Type', 'application/json;charset=utf-8' ],
        referer: [ 'Referer', 'https://zhoukou.xueanquan.com/login.html' ],
        cookie: [
          'Cookie',
          'RecordLoginInput_20083=jinyangyang8958; SafeApp=true; ServerSide=https://zhoukou.xueanquan.com; UserID=24112D8AE09F654A; _UCodeStr={%0d%0a  "Grade": 11,%0d%0a  "ClassRoom": 1088163,%0d%0a  "CityCode": 190032%0d%0a};'
        ],
        'user-agent': [ 'User-Agent', 'axios/0.21.1' ],
        'content-length': [ 'Content-Length', 26 ],
        host: [ 'Host', 'huodongapi.xueanquan.com' ]
      }
    },
    _currentUrl: 'https://huodongapi.xueanquan.com/p/henan/Topic/topic/platformapi/api/v1/records/sign',
    [Symbol(kCapture)]: false
  },
  response: undefined,
  isAxiosError: true,
  toJSON: [Function: toJSON]
}
sakurayun commented 3 years ago

虽然最后一个问题暂时还没解决,但是先总结一下希望有所帮助

cookie问题: 将cookie中的""替换为 '' ,注意,不是 ‘’

若出现管理账号登陆成功,但是学生账号频繁提示:

学知识 200 false 请先登录
问卷签到 200 false 请先登录

请检查serverside,将“wenzhou”改为本市的拼音, 将“zhejiang”改为自己所处的省份的拼音! 请注意务必在index.js全局替换

BH4HPA commented 3 years ago

你好,根据你提供的信息,

<ref *1> Error: connect ETIMEDOUT 112.17.39.87:443
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1146:16) {
  errno: -4039,
  code: 'ETIMEDOUT',
  syscall: 'connect',
  address: '112.17.39.87',

可以看到提示 TIMEDOUT 请求超时错误,不是代码问题。