#QuickTip: Easy & powerful solution for screen scraping with NodeJS


Today I was fighting all day long with different "solutions" and implementations that promise you simplify this task in NodeJS (screen scraping) but the reality is it can become a pain in the ass really quickly. Fortunately I've found a nice little npm module that makes things really, really easy: scrap.

NOTE: And when I'm saying "really easy" I mean REALLY easy, not just a fake promise to sweeten an ugly truth haha.

The only "problem" I see with this module is that the outputs are really bloated, so you might have to read and search a lot while you're testing in order to get exactly what you want. The upside to this problem is that it uses a jQuery style selector syntax (it's not 100% "loyal" to jQuery but pretty close) and that makes the job easier at the end of the day.

Here's a snippet of a kinda complex usage example:


Here we're scrapping this id-less/class-less value (from a table):


Go to the URL to inspect the markup yourself. If you wanna use and know scrap, then visit it's npm page at: