Created
May 20, 2017 13:56
-
-
Save Chan9390/f68dcdaf7e5ef446f3c7c4ad930a9f3e to your computer and use it in GitHub Desktop.
OSINT using Facebook alt text
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 requests | |
from bs4 import BeautifulSoup as bs | |
profile = "https://www.facebook.com/<profile_name>" | |
headers = { | |
'accept':'*/*', | |
'accept-language':'en-US,en;q=0.8', | |
'User-Agent': 'Put any authentic header here. If not, facebook can understand this is bot script and the details will be striped', | |
'referer':profile | |
} | |
r = requests.Session() | |
temp = r.get(profile, headers=headers) | |
soup = bs(temp.text, "lxml") | |
m = soup.find("img", {"class":"profilePic img"}) | |
info = m.get('alt') | |
print info |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment