restored the scraper.js implementation