Skip to content

Instantly share code, notes, and snippets.

@Chan9390
Created May 20, 2017 14:00
Show Gist options
  • Save Chan9390/db2ba5f376c249ba13a171d2183c8def to your computer and use it in GitHub Desktop.
Save Chan9390/db2ba5f376c249ba13a171d2183c8def to your computer and use it in GitHub Desktop.
import requests
from bs4 import BeautifulSoup as bs
profile = "https://www.facebook.com/<profile_name>"
r = requests.get(profile, headers=headers)
soup = bs(r.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