Created
October 27, 2021 19:48
-
-
Save cristianzsh/f7001a82a6aae9188b7fccd95e9a29aa to your computer and use it in GitHub Desktop.
OSINT: Captura de dados de usuários do Facebook.
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
#!/usr/bin/python3 | |
""" | |
Captura dados de usuários do Facebook. | |
""" | |
import urllib.request | |
from facebook_scraper import get_profile | |
username = input("Nome do usuário: ") | |
output = input("Salvar dados? [S/n]: ") | |
data = get_profile(username) | |
cover_photo = data["cover_photo"] | |
profile_photo = data["profile_picture"] | |
name = data["Name"] | |
work = data["Work"] | |
print("Nome: {}".format(name)) | |
print("Trabalho: {}".format(work)) | |
print("Foto de perfil: {}".format(profile_photo)) | |
print("Foto de capa: {}".format(cover_photo)) | |
if output == "S": | |
f = open("{}.txt".format(username), "a") | |
f.write(name) | |
f.write(work) | |
f.write(profile_photo) | |
f.write(cover_photo) | |
f.close() | |
urllib.request.urlretrieve(profile_photo, "{}.jpg".format(username)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment