Covest
February 2nd, 2013, 09:46 AM
This is a newbie problem with python, advice is much appreciated. no-ip.com provides an easy way to update a computer's changing ip-address, simply open the url
http://user:password@dynupdate.no-ip.com/nic/update?hostname=my.host.name...both http and https work when entered in firefox. I tried to implement that in a script residing in "/etc/NetworkManager/dispatcher.d" to be used by Network Manager on a recent version of Ubuntu.
What works is the python script:
from urllib import urlopen;
urlopen("http://user:password@dynupdate.no-ip.com/nic/update?hostname=my.host.name")What I want to have is the same with "https", which does not work as easily. Could anyone, please,
(1) show me what the script should look like for https,
(2) give me some keywords, which I can use to learn about this.
(3) perhaps even explain why it does not work any more when the script is changed to using "urllib2":
from urllib2 import urlopen;
urlopen("http://user:password@dynupdate.no-ip.com/nic/update?hostname=my.host.name")Thank you!
http://user:password@dynupdate.no-ip.com/nic/update?hostname=my.host.name...both http and https work when entered in firefox. I tried to implement that in a script residing in "/etc/NetworkManager/dispatcher.d" to be used by Network Manager on a recent version of Ubuntu.
What works is the python script:
from urllib import urlopen;
urlopen("http://user:password@dynupdate.no-ip.com/nic/update?hostname=my.host.name")What I want to have is the same with "https", which does not work as easily. Could anyone, please,
(1) show me what the script should look like for https,
(2) give me some keywords, which I can use to learn about this.
(3) perhaps even explain why it does not work any more when the script is changed to using "urllib2":
from urllib2 import urlopen;
urlopen("http://user:password@dynupdate.no-ip.com/nic/update?hostname=my.host.name")Thank you!