mwpenny / kijiji-scraper

A lightweight node.js module for retrieving and scraping ads from Kijiji
MIT License
96 stars 44 forks source link

Use attr() to get attributes instead of reading raw attribs object #46

Closed mwpenny closed 3 years ago

mwpenny commented 3 years ago

@technoligest While writing tests I found a way to do it which requires no additional branching :)

Usage of attribs is a holdover from when I wrote the first version of this in 2015 and Cheerio was less mature (and so was I, evidently, haha). Cheerios has the jQuery-like attr() which we can use.