add geting ip

This commit is contained in:
Rykov7
2023-01-19 07:14:42 +03:00
parent f7f59325c0
commit 3c5605d390
4 changed files with 16 additions and 1 deletions
+7
View File
@@ -0,0 +1,7 @@
from urllib.request import urlopen
def my_ip():
ip_service = 'https://icanhazip.com'
ip = urlopen(ip_service, )
return ip.read().decode('utf-8')