Fixed error handling for regex, and error for passing beautifulsoup the response object instead of response HTML text.