taoqf / node-html-parser

A very fast HTML parser, generating a simplified DOM, with basic element query support.
MIT License
1.12k stars 112 forks source link

To many results for querySelectorAll with tag. #35

Closed xilokaine closed 4 years ago

xilokaine commented 4 years ago

bellow the code which get to many results for the table tag.

const request = require('request'); const HTMLParser = require ('node-html-parser'); request('http://nagiosadmin:nagiosadmin@nagioscore.demos.nagios.com/nagios/cgi-bin/status.cgi?host=all&limit=0', function (error, response, body) { const root = HTMLParser.parse(body); const table = root.querySelectorAll('table'); console.log(table) });

taoqf commented 4 years ago

Thanks. try v1.2.13