dom-walker
v3.2.0
Published
Walk DOM with BFS and DFS traversing algorithms
Downloads
12
Readme
Walk DOM started from document.documentElement
with BFS and DFS traversing algorithms, prints the number of nodes and maximum depth
$ npm i dom-walker -g
USE NODE
$ dom-walker --url=kinopoisk.ru --parser=node --traverse=bfs
OR PHANTOM
$ dom-walker --url=kinopoisk.ru --parser=phantom --traverse=dfs
Add assert with max depth check
$ dom-walker --url=kinopoisk.ru --parser=node --traverse=dfs --depth=30
$ dom-walker --url=kinopoisk.ru --parser=phantom --traverse=bfs --depth=30
Clone repo and run it locally
$ git clone https://github.com/k03mad/dom-walker
$ cd dom-walker
$ npm run walk --url=kinopoisk.ru --parser=node --traverse=bfs --depth=30