This script now fully handles the scraping process