I need to export the data-utime from the following line:
<abbr title="23/1/20, 10:52 π.μ." data-utime="1579805539" data-shorten="1" class="_5ptz">
How can I do that? Played with soup.find()
for a while but didn't find solution.
I need to export the data-utime from the following line:
<abbr title="23/1/20, 10:52 π.μ." data-utime="1579805539" data-shorten="1" class="_5ptz">
How can I do that? Played with soup.find()
for a while but didn't find solution.
You can do a find
and then a get
to have the value of the attribute.
Like this:
utime = soup.find('abbr', {'class': '_5ptz'}).get('data-utime')