Skip to content

Instantly share code, notes, and snippets.

@aalipar13
Created September 7, 2018 12:04
Show Gist options
  • Save aalipar13/3f029eb4df073d3ca2e8678cfdb37933 to your computer and use it in GitHub Desktop.
Save aalipar13/3f029eb4df073d3ca2e8678cfdb37933 to your computer and use it in GitHub Desktop.
import requests
from bs4 import BeautifulSoup
user = 'LazadaPhilippines'
url = 'https://www.facebook.com/'+ user
response = requests.get(url)
soup = BeautifulSoup(response.content)
f = soup.find('div', attrs={'class': '_4-u3 _5sqi _5sqk'})
likes=f.find('span',attrs={'class':'_52id _50f5 _50f7'}) #finding span tag inside class
print(likes.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment