Made the scrape function mimic the 'request' library's interface