1
0
mirror of https://github.com/balkian/gists.git synced 2024-11-24 18:32:27 +00:00
gists/get hostname from ifconfig.co/hostname.py

7 lines
157 B
Python
Raw Normal View History

2018-07-25 17:24:48 +00:00
try:
import urllib2
except ImportError:
from urllib.request import urlopen
response = urlopen('http://v4.ifconfig.co/ip')
HOSTNAME = response.read()