Your inputs are actually XML tags without a closing tag. So what you can do, is using
xml.etree.ElementTree
to parse (your string +
</text>
) and then use the attributes on the parsed tag:
import xml.etree.ElementTree
inputs = ['<text id="32a45" language="ENG" date="2017-01-01" time="11:00" timezone="Eastern">',
'<text id="32a47" language="ENG" date="2017-01-05" time="1:00" timezone="Central">',
'<text id="32a48" language="ENG" date="2017-01-07" time="3:00" timezone="Pacific">']
ids = []
dates = []
for l in inputs:
element = xml.etree.ElementTree.fromstring(l + "</text>")
attributes = element.attrib
ids.append(attributes["id"])
dates.append(attributes["date"])
print(ids)
print(dates)