V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐关注
Meteor
JSLint - a JavaScript code quality tool
jsFiddle
D3.js
WebStorm
推荐书目
JavaScript 权威指南第 5 版
Closure: The Definitive Guide
raighne

爬虫爬取网页无法得到数组,得到的是一个对象

  •  
  •   raighne · Oct 24, 2017 · 1934 views
    This topic created in 3115 days ago, the information mentioned may be changed or developed.

    在 Web 控制台,输出$('#newlist').find('.list')能得到一个数组, 但是在程序里,会打印出一个对象如下 往下解也无法得到想要的

    initialize {
      options: 
       { normalizeWhitespace: false,
         xmlMode: false,
         decodeEntities: true,
         withDomLvl1: true },
      _root: 
       initialize {
         '0': 
          { type: 'root',
            name: 'root',
            attribs: {},
            children: [Object],
            next: null,
            prev: null,
            parent: null },
         options: 
          { normalizeWhitespace: false,
            xmlMode: false,
            decodeEntities: true,
            withDomLvl1: true },
         length: 1,
         _root: [Circular] },
      length: 0,
      prevObject: 
       initialize {
         options: 
          { normalizeWhitespace: false,
            xmlMode: false,
            decodeEntities: true,
            withDomLvl1: true },
         _root: initialize { '0': [Object], options: [Object], length: 1, _root: [Circular] },
         length: 0,
         prevObject: initialize { '0': [Object], options: [Object], length: 1, _root: [Circular] } } }
    
    
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2514 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 15:37 · PVG 23:37 · LAX 08:37 · JFK 11:37
    ♥ Do have faith in what you're doing.