Ported urrlib calls to python3. It seems to work, but needs to be tested