Skip to content
Snippets Groups Projects
Commit c0f08cd0 authored by Jan Seipel's avatar Jan Seipel
Browse files

Testskript hinzugefügt

parent 637918dd
No related branches found
No related tags found
No related merge requests found
File added
File added
File added
...@@ -61,12 +61,13 @@ def parse_xml(xml_file): ...@@ -61,12 +61,13 @@ def parse_xml(xml_file):
plugpara = vi.find('.//ns:PLUGPARA', ns) plugpara = vi.find('.//ns:PLUGPARA', ns)
if plugpara is not None: if plugpara is not None:
instance = plugpara.get('instance') instance = plugpara.get('instance')
instance_num = instance[-1]
konf = plugpara.get('konf') konf = plugpara.get('konf')
amo = plugpara.get('amo') amo = plugpara.get('amo')
ak = plugpara.get('ak') ak = plugpara.get('ak')
gk = plugpara.get('gk') gk = plugpara.get('gk')
link = f"https://linkresolver2.ivz.cn.ard.de/linkresolver/resolve?context=hfdb2&hfdb-recherche/permalink?typ=vollinfoAnzeige&vollinfoArt=vollinfokonf&ak={ak}&ko={konf}&amo={amo}&gkonf={gk}&destination={instance}" link = f"https://linkresolver{instance_num}.ivz.cn.ard.de/linkresolver/resolve?context=hfdb{instance_num}&hfdb-recherche/permalink?typ=vollinfoAnzeige&vollinfoArt=vollinfokonf&ak={ak}&ko={konf}&amo={amo}&gkonf={gk}&destination={instance}"
item['link'] = link item['link'] = link
else: else:
print("Kein PLUGPARA Element gefunden") print("Kein PLUGPARA Element gefunden")
......
This diff is collapsed.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from src.hfdb_xml_converter.parser import xml_to_json
filepath = "/root/hfdb_xml_converter/hfdb_xml_converter/test/bericht.xml"
output_dir = "/root/hfdb_xml_converter/hfdb_xml_converter/test/"
xml_to_json(filepath,output_dir)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment