Access a feed whose layout looks like this:
<horoscope>
<date>20170627</date>
<listItem>
<item>
<signTitle begin="21/03" end="19/04">Áries</signTitle>
<content>
BNononononononononononon
</content>
<linktexto>
<![CDATA[
<a href='' target='blank'></a> ]]>
</linktexto>
<textosaida>
<![CDATA[
]]>
</textosaida>
<linksaida>
<![CDATA[
<a href='' target='blank'></a> ]]>
</linksaida>
</item>
</listItem>
</horoscope>
When parsing using the feedparser library, I want to extract the value of the tag in the case of "Aries", but instead I get the following output:
{'begin': '21 / 03 ',' end ': '19 / 04'}
What are the "begin" and "end" attributes of the tag. But the inner value does not really come. My code goes below:
import feedparser
d = feedparser.parse(caminho_do_xml)
for post in d.entries:
print(post.signtitle)
How can I access the content of the tag, rather than just the attributes? Thank you.