Closed ghost closed 9 years ago
@aabroder: I’ve sent a PR to upgrade the tutorial from bs3 to bs4.
The \xa0
characters are still non-breaking spaces, but in unicode. I’ve fixed it a different way (using strip
instead of replace
) because that should work in both python 2.x and python 3.x.
I much prefer using with open
for file handling – that’s a good suggestion, and will work in python 2.x as well.
Thank you for the tutorial! I did it with python3, so there were a few differences. But there's also been a change for BeautifulSoup that affected my install at least.
Here's what I found
Below is the final code with notes on the key differences I encountered. Thanks again!