Problems with inner scope when resolving the promise after scraping.