ComicRack_Scripts/CVIssueCount/count.py

20 lines
421 B
Python

import xml.etree.ElementTree as ET
t = """<response>
<error>OK</error>
<limit>1</limit>
<offset>0</offset>
<number_of_page_results>1</number_of_page_results>
<number_of_total_results>1</number_of_total_results>
<status_code>1</status_code>
<results>
<count_of_issues>403</count_of_issues>
</results>
<version>1.0</version>
</response>"""
tree = ET.parse(t)
root = tree.getroot()
for data in root[1]:
print data.text