prettier printer
This commit is contained in:
parent
b90e997119
commit
0ca041e6c8
|
@ -15,12 +15,14 @@ if os.listdir("../../data/"):
|
||||||
tree = ET.parse("../../data/PrixCarburants_instantane.xml")
|
tree = ET.parse("../../data/PrixCarburants_instantane.xml")
|
||||||
root = tree.getroot()
|
root = tree.getroot()
|
||||||
interesting_pomp = [item for item in root if item.attrib["cp"][:2] == "86"]
|
interesting_pomp = [item for item in root if item.attrib["cp"][:2] == "86"]
|
||||||
val = [
|
for item in interesting_pomp:
|
||||||
[(item[i].tag, item[i].attrib) for i in range(len(item))]
|
print("Longitude :", item.attrib["longitude"], "\n")
|
||||||
for item in interesting_pomp
|
print("Latitude :", item.attrib["latitude"], "\n")
|
||||||
]
|
print("Code Postal :", item.attrib["cp"], "\n")
|
||||||
for item in val[:3]:
|
|
||||||
print(parser(item))
|
for sub_item in item:
|
||||||
|
print(sub_item.tag, sub_item.attrib)
|
||||||
|
print("\n\n")
|
||||||
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue