Skip to content

Instantly share code, notes, and snippets.

@eliezerfot123
Created May 11, 2016 18:00
Show Gist options
  • Save eliezerfot123/46308e62fcbc2bff05edf8a0d2314188 to your computer and use it in GitHub Desktop.
Save eliezerfot123/46308e62fcbc2bff05edf8a0d2314188 to your computer and use it in GitHub Desktop.
Obtener IP desde una lista de URL Con python
import socket
f = open("urls.txt")
num_line = sum(1 for line in f)
f.close()
with open("urls.txt", "r") as ins:
array = []
for line in ins:
print socket.gethostbyname(line.strip())
@eliezerfot123
Copy link
Author

En las urls.txt pondriamos algo como:
www.google.com
www.laurlquequieras.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment