Created
September 7, 2018 12:04
-
-
Save aalipar13/3f029eb4df073d3ca2e8678cfdb37933 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
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