troubleshooting an issue with beautiful soup parsing