Fix content parsing in Python 3.