V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐关注
Meteor
JSLint - a JavaScript code quality tool
jsFiddle
D3.js
WebStorm
推荐书目
JavaScript 权威指南第 5 版
Closure: The Definitive Guide
raighne
V2EX  ›  JavaScript

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

  •  
  •   raighne · 2017-10-24 10:13:54 +08:00 · 1589 次点击
    这是一个创建于 2347 天前的主题,其中的信息可能已经有所发展或是发生改变。

    在 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] } } }
    
    
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1087 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 22:47 · PVG 06:47 · LAX 15:47 · JFK 18:47
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.