sxoinas12 2 жил өмнө
parent
commit
c89c7210c0

+ 10 - 0
telecaster/telecaster/parsers/parse_xml_to_json.py

@@ -0,0 +1,10 @@
+def parse_xml_to_json(xml):
+    response = {}
+
+    for child in list(xml):
+        if len(list(child)) > 0:
+            response[child.tag] = parse_xml_to_json(child)
+        else:
+            response[child.tag] = child.text or ''
+
+    return response

+ 2 - 0
telecaster/telecaster/parsers/skroutz_parser.py

@@ -0,0 +1,2 @@
+class SkroutzParser(url):
+    pass