ipinfo、ipinfodb

import requestsimport json# IP address to testip_address = '147.229.2.90'request_url = 'https://geolocation-db.com/jsonp/' + ip_addressresponse = request" />

国产成人精品无码青草_亚洲国产美女精品久久久久∴_欧美人与鲁交大毛片免费_国产果冻豆传媒麻婆精东

18143453325 在線咨詢 在線咨詢
18143453325 在線咨詢
所在位置: 首頁 > 營銷資訊 > 建站知識 > 域名IP解析并判斷國家屬地

域名IP解析并判斷國家屬地

時間:2023-02-13 08:06:01 | 來源:建站知識

時間:2023-02-13 08:06:01 來源:建站知識

IP查詢的API

ipinfo、ipinfodb

import requestsimport json# IP address to testip_address = '147.229.2.90'request_url = 'https://geolocation-db.com/jsonp/' + ip_addressresponse = requests.get(request_url)result = response.content.decode()result = result.split("(")[1].strip(")")result = json.loads(result)print(result)


IP geolocation with Python - Step by step guide




域名解析

import socketdef URL2IP(): for oneurl in urllist.readlines(): url=str(oneurl.strip())[7:] print url try: ip =socket.gethostbyname(url) print ip iplist.writelines(str(ip)+"/n") except: print "this URL 2 IP ERROR "try: urllist=open("D:/urllist.txt","r") iplist=open("D:/iplist.txt","w") URL2IP() urllist.close() iplist.close() print "complete !"except: print "ERROR !"Python--域名解析成IP地址_LandGrey的博客-CSDN博客_python解析域名ip





關鍵詞:判斷,國家,屬地

74
73
25
news

版權所有? 億企邦 1997-2025 保留一切法律許可權利。

為了最佳展示效果,本站不支持IE9及以下版本的瀏覽器,建議您使用谷歌Chrome瀏覽器。 點擊下載Chrome瀏覽器
關閉