1

I'm using this code and it works fine when using HTTP but it is not working when connecting over HTTPS

import urllib
import ssl
(fn,hd) = urllib.urlretrieve('http://host.com/file.py')
execfile(fn)

Does anyone know how to connect to HTTPS using the same code?

Thanks for the help all.

ntsu
  • 67
  • 1
  • 7

1 Answers1

0

try replacing http with https.

answers on this topic pretty much cover it: How to know if urllib.urlretrieve succeeds?

jcklopp
  • 451
  • 5
  • 9