Doing some web scraping and I need to extract the date from inside a HTML tag that looks something like this:
<div class="DateTime" title="Feb 21, 2018 at 1:27 AM">Feb 21</div>
I need to pull out the text at title
, as this is the full date.
I have tried:
s = '<div class="DateTime" title="Feb 21, 2018 at 1:27 AM">Feb 21</div>'
l = s.split('"')[1::2]
print l[1]
However I get the error "TypeError: 'NoneType' object is not callable"