For example:
div data3456 = "some value"
data3456
is a custom attribute for the div
. How can I scan the html looking for "data3456" and find "some value"?
For example:
div data3456 = "some value"
data3456
is a custom attribute for the div
. How can I scan the html looking for "data3456" and find "some value"?
You can use similar logic which is used here: How to use CSS selectors to retrieve specific links lying in some class using BeautifulSoup? .
Try this:
for el in upcoming_events_div.select('div[data3456]'):
print el['data3456']