Skip to content

Instantly share code, notes, and snippets.

@Chan9390
Created May 20, 2017 13:56
Show Gist options
  • Save Chan9390/f68dcdaf7e5ef446f3c7c4ad930a9f3e to your computer and use it in GitHub Desktop.
Save Chan9390/f68dcdaf7e5ef446f3c7c4ad930a9f3e to your computer and use it in GitHub Desktop.
OSINT using Facebook alt text
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