<a href="javascript:popUp('http://www.abcd.com/calendar/event.php?calendar=1&category=&event=43221&date=2016-02-22','520','520');" onmouseout="javascript:hideEventDetailsBox();" onmouseover="javascript:eventDetailsBox('<b>Time:</b> 9:00xa0AM-4:30xa0PM<br /><b>Title:</b> Hello!<br /><b>Location:</b> Cultural World N Avenue <br /><b>Description:</b> abcdefghi');" style="font-family:Tahoma;font-size:small;color:#000000;">
I want to scrap the fields(Time/Title/Description/Location from the above HTML using Beautiful Soup4. I am unable to access these attributes inside "onmouseover". I tried the below :
print g_dataItem.contents[5].find_all(onmouseover=True)
for tag in g_dataItem.contents[5].findAll(onmouseover=True):
print tag['onmouseover']
to get the part.
javascript:eventDetailsBox('Time: 9:00 AM-4:30 PMTitle: Hello!Location: Cultural World N AvenueDescription: abcdefghi');
But once I get the above, which is in unicode, I am unable to extract the fields from here. Can somebody help ?
Aucun commentaire:
Enregistrer un commentaire