Skip to content

Commit

Permalink
Added more data
Browse files Browse the repository at this point in the history
  • Loading branch information
Ismael Moral committed Apr 27, 2015
1 parent 5a3d4e3 commit e9cd3a6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions AnimeXML.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,22 @@
# Start parsing XML.
root = ElementTree.fromstring (xmlData)

# Extract classic data.
for info in root.iter("anime"):
print ("Id: " + info.get("id"))
print ("Gid: " + info.get("gid"))
print ("Name: " + info.get("name"))
print ("Precision: " + info.get("precision"))
print ("Type: " + info.get("type"))

# Extract date and general poster.
for info in root.iter ("info"):
if ("Vintage" in info.get("type")):
print ("Date: " + info.text)

if ("Picture" in info.get("type")):
print ("Poster: " + info.get("src"))

# Extract aditional posters.
for img in root.iter ("img"):
print ("Poster: " + img.get("src"))

0 comments on commit e9cd3a6

Please sign in to comment.