I want to scrape a website's amount of likes. Using BeautifulSoup, this is what I got so far:
user = 'LazadaMalaysia'
url = 'https://www.facebook.com/'+ user
response = requests.get(url)
soup = BeautifulSoup(response.content,'lxml')
f = soup.find('div', attrs={'class': '_4bl9'})
The output I receive for f is as follows:
<div class="_4bl9 _3bcp"><div aria-keyshortcuts="Alt+/" aria-label="Pembantu Navigasi" class="_6a _608n" id="u_0_8" role="menubar"><div class="_6a uiPopover" id="u_0_9"><a aria-expanded="false" aria-haspopup="true" class="_42ft _4jy0 _55pi _2agf _4o_4 _63xb _p _4jy3 _517h _51sy" href="#" id="u_0_a" rel="toggle" role="button" style="max-width:200px;"><span class="_55pe">Bahagian-bahagian pada halaman ini</span><span class="_4o_3 _3-99"><i class="img sp_m7lN5cdLBIi sx_d3bfaf"></i></span></a></div><div class="_6a _3bcs"></div><div class="_6a mrm uiPopover" id="u_0_b"><a aria-expanded="false" aria-haspopup="true" class="_42ft _4jy0 _55pi _2agf _4o_4 _3_s2 _63xb _p _4jy3 _4jy1 selected _51sy" href="#" id="u_0_c" rel="toggle" role="button" style="max-width:200px;" tabindex="-1"><span class="_55pe">Bantuan Kebolehcapaian</span><span class="_4o_3 _3-99"><i class="img sp_m7lN5cdLBIi sx_0a4c0e"></i></span></a></div></div></div>
I used the code from this link: How do I scrape the about section of a Facebook page?
Unfortunately, it does not work and I cannot wrap my head around why this is the case. Here is the part I want to scrape:

divs of class_4b19, since you are usingfind(), it's only to give you the first instance of that class from the page. The point I'm trying to get at is that the specificdivyou want with the likes could be further down the page and you just aren't catching it yet. Usingfind_all()will give you a list of all classes_4b19, try looking through that list to see if you are even picking up the likes or you may need to rework the parameters of yourfind()- David Owenssoup.find_all("div", string="people like this")a shot? - David Owens