Get unlimited public & private packages + team-based management with npm Teams.Learn more »

dom-walker

3.2.0 • Public • Published

NPM

dependencies Status

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

Keywords

Install

npm i dom-walker

DownloadsWeekly Downloads

41

Version

3.2.0

License

MIT

Last publish

Collaborators

  • avatar