반응형
from urllib import request
def get_external_ip():
return request.urlopen('https://ident.me').read().decode('utf8')
ip = get_external_ip()
print(ip)
반응형
'Programing > python' 카테고리의 다른 글
파이썬 커리큘럼 (0) | 2023.02.26 |
---|---|
[python] country code 가지고 오기 (0) | 2021.05.11 |
외부 쓰레드에서 qt ui 접근 (0) | 2021.05.11 |
OpenGL in python : create window (0) | 2021.03.15 |
[python] file io 연습 (0) | 2020.02.24 |