Changed urlopen statements to not use 'with' as it is only support by Python 3.