В дополнение к ответу выше: Вы также можете использовать XML Parser (стандартный модуль) для достижения того, что вы пытаетесь сделать:
# Save your xml on disk
with open('sitemap.xml', 'w') as f:
f.write(text)
f.close()
# Import XML-Parser
import xml.etree.ElementTree as ET
# Load xml and obtain the root node
tree = ET.parse('sitemap.xml')
root_node = tree.getroot()
Отсюда вы можете получить доступ к своему xml Узлы так же, как и любой другой объект, подобный списку:
print(root_node[1][0].text) # output: 'https://grapaes.com/about-us-our-story/'
print(root_node[1][1].text) # output: '2020-01-12T12:13+00:00'
Создать из него такой простой дикт:
dicto = dict()
for child in root_node:
dicto.setdefault(child[0], child[1])