I am trying to scrape the complete date details as: SATURDAY, JANUARY 30, 2021 AT 8:30 PM UTC+05:30 – 12:30 AM UTC+05:30
Code tag:
<div class="j83agx80 cbu4d94t obtkqiv7 sv5sfqaa">
<div class="bi6gxh9e aov4n071">
<h2 class="gmql0nx0 l94mrbxd p1ri9a11 lzcic4wl d2edcug0 hpfvmrgz" dir="auto">
<span class="d2edcug0 hpfvmrgz qv66sw1b c1et5uql rrkovp55 a8c37x1j keod5gw0 nxhoafnm aigsh9s9 d3f4x2em fe6kdd0r mau55g9w c8b282yb iv3no6db jq4qci2q a3bd9o3v hnhda86s jdix4yx3 hzawbc8m" dir="auto">
::before
"SATURDAY, JANUARY 30, 2021 AT 8:30 PM UTC+05:30 – 12:30 AM UTC+05:30"
::after
</span>
</h2>
</div>
Can anyone help me out with this...
I tried with the below code but not working:
import bs4 as bs
import urllib.request as url
import requests
source = url.urlopen('https://www.facebook.com/events/777016493046448/')
soup = bs.BeautifulSoup(source, 'html.parser')
result = soup.find('span', attrs={'class':'d2edcug0 hpfvmrgz qv66sw1b c1et5uql rrkovp55 a8c37x1j keod5gw0 nxhoafnm aigsh9s9 d3f4x2em fe6kdd0r mau55g9w c8b282yb iv3no6db jq4qci2q a3bd9o3v hnhda86s jdix4yx3 hzawbc8m'}).text
print(result)
question from:
https://stackoverflow.com/questions/65940094/how-to-scrape-the-event-details-using-python 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…