2
나는 아래에 따라 cheerio.js
을 사용하고 있습니다 :cheerio.js에서 노드 줄 번호를 얻는 방법은 무엇입니까?
var $ = cheerio.load(html,{withStartIndices : true});
것은 내가 console.log($('#element1'));
를 사용하는 경우. 문자 위치가있는 노드를 반환합니다.
{
type: 'tag',
name: 'h6',
attribs: { align: 'center', id: 'r' },
children: [ [Object] ],
next: null,
startIndex: 310,
.......
특정 요소에 대해 cheerio.js
에 줄 번호를 가져 오는 방법이 있습니까?