catch errors in beautiful soup