Should now support both Python 2 and 3. (may be buggy(er)).
Fixed missed urllib conversions.