Scraper logic refactor