Trapped a lot of errors in the scraping code