Created
May 11, 2016 18:00
-
-
Save eliezerfot123/46308e62fcbc2bff05edf8a0d2314188 to your computer and use it in GitHub Desktop.
Obtener IP desde una lista de URL Con python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
En las urls.txt pondriamos algo como:
www.google.com
www.laurlquequieras.com