I'm using the following lines of code to get the utime of an element. From the output I can see that I'm targeting the correct area and that the utime attribute is present there, but I still recieve an output of None. I have tried re-writing the data-utime attribute several times to make sure it is formatted correctly for the function. What am I missing here?
Code:
timeStampBox = post.find_element_by_css_selector('.fsm.fwn.fcg')
timeStampBox = timeStampBox.find_element_by_class_name('_5pcq')
print(timeStampBox.get_attribute('innerHTML'))
print(timeStampBox.get_attribute('data-utime'))
Output:
<abbr title="Monday, September 4, 2017 at 6:11am" data-utime="1504530675" data-shorten="1" class="_5ptz"><span class="timestampContent" id="js_15">September 4 at 6:11am</span></abbr>
None