corrected the way of urllib use because in python3.2 is different. I tried to support older version