1
0
mirror of https://github.com/balkian/gists.git synced 2024-11-22 01:32:29 +00:00
This commit is contained in:
J. Fernando Sánchez 2018-07-25 19:24:48 +02:00 committed by GitHub
commit c3f90fc237

6
hostname.py Normal file
View File

@ -0,0 +1,6 @@
try:
import urllib2
except ImportError:
from urllib.request import urlopen
response = urlopen('http://v4.ifconfig.co/ip')
HOSTNAME = response.read()