notebookvb
This commit is contained in:
@@ -15,12 +15,7 @@ UZIVATEL = "E08C89C6-2B1A-4EBA-8ED9-4E3E63618379"
|
||||
PRACOVISTE = "00214235367"
|
||||
|
||||
ENDPOINTS = [
|
||||
"https://lekar-soap.erecept.sukl.cz/erp/Lekar",
|
||||
"https://lekar-soap.erecept.sukl.cz/erp/cuer/Lekar",
|
||||
"https://lekar-soap.erecept.sukl.cz/cuer/NacistLekovyZaznam",
|
||||
"https://lekar-soap.erecept.sukl.cz/erp/NacistLekovyZaznam",
|
||||
"https://lekar-soap.erecept.sukl.cz/LekovyZaznam",
|
||||
"https://cuer-soap.erecept.sukl.cz/cuer/Lekar",
|
||||
"https://lekar-soap.erecept.sukl.cz/cuer/Lekar2",
|
||||
]
|
||||
|
||||
# --- Pacient ---
|
||||
@@ -68,23 +63,12 @@ def nacist_lekovy_zaznam():
|
||||
"User-Agent": "Medicus"
|
||||
}
|
||||
|
||||
# Zkusíme stáhnout WSDL ze serverů
|
||||
wsdl_urls = [
|
||||
"https://lekar-soap.erecept.sukl.cz/cuer/Lekar?wsdl",
|
||||
"https://cuer-soap.erecept.sukl.cz/?wsdl",
|
||||
"https://cuer-soap.erecept.sukl.cz/?singleWsdl",
|
||||
]
|
||||
for url in wsdl_urls:
|
||||
print(f"\n--- WSDL: {url} ---")
|
||||
for url in ENDPOINTS:
|
||||
print(f"\n--- POST: {url} ---")
|
||||
try:
|
||||
resp = sess.get(url, timeout=10)
|
||||
resp = sess.post(url, data=soap_body.encode("utf-8"), headers=headers, timeout=15)
|
||||
print(f"HTTP {resp.status_code} | {len(resp.content)} bytů")
|
||||
if resp.status_code == 200:
|
||||
fname = url.replace("https://","").replace("/","_").replace("?","_") + ".xml"
|
||||
with open(fname, "wb") as f:
|
||||
f.write(resp.content)
|
||||
print(f"Uloženo: {fname}")
|
||||
print(resp.text[:1000])
|
||||
print(resp.text)
|
||||
except Exception as e:
|
||||
print(f"CHYBA: {e}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user