update python script to use requests library instead of urllib