mwpenny / kijiji-scraper

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

Fix date attribute parsing for HTML scraper (#61) #62

Closed mwpenny closed 3 years ago

mwpenny commented 3 years ago

Permissive date parsing means that strings like "size-10" are considered valid date strings ("size-" is ignored, and "10" is treated as number of months since January 1, 2000).

Kijiji uses ISO-style date strings, so reject dates whose raw value begins with a non-numeric characters.