“Python Uzyskaj informacje IP” Kod odpowiedzi

Zdobądź zewnętrzny Python IP

# This example requires the requests library be installed.  You can learn more
# about the Requests library here: http://docs.python-requests.org/en/latest/

from requests import get

ip = get('https://api.ipify.org').text
print 'My public IP address is:', ip
Joeyeyey

Uzyskaj Python adresu IP

import socket    
hostname = socket.gethostname()    
IPAddr = socket.gethostbyname(hostname)    
print("Your Computer Name is:" + hostname)    
print("Your Computer IP Address is:" + IPAddr) 
#How to get the IP address of a client using socket
Clumsy Caterpillar

Python Uzyskaj informacje IP

import requests

# get your current public ip's info:
req = requests.get('https://utilities.tk/network/info')

# or specify an ip to check
req = requests.get('https://utilities.tk/network/info?ip=1.1.1.1')

print(req.status_code)
print(req.json())
ProxyBlade

Odpowiedzi podobne do “Python Uzyskaj informacje IP”

Pytania podobne do “Python Uzyskaj informacje IP”

Więcej pokrewnych odpowiedzi na “Python Uzyskaj informacje IP” w Python

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu