python Domain name transfer ip Address
If it can be run, it will be adopted
import socket def 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 !")