py3: hash encoding
py3: urllib restructured