mateuszskoczek e655b51da3
Some checks failed
Analyze code and publish script / Analyze code (push) Successful in 53s
Analyze code and publish script / Publish script (push) Failing after 1m54s
Update cdl_downloader/__main__.py
e655b51da3 · 2026-02-03 23:13:27 +01:00
13 Commits
2026-02-01 22:10:09 +01:00
2026-02-01 22:10:09 +01:00
2026-02-03 21:54:42 +01:00

CDL Downloader

Automation script for downloading medical test results files from ewyniki.cdl.pl

CDL Downloader makes use of Selenium test software to automatically fill patient data textboxes and download PDF files.


Features

  • Headless mode - can be used entirely without graphical interface
  • Returns basic information after download - script returns basic data in JSON format, such as failure/success status and tests results as html table

Requirements

  • Chrome Driver installed
  • PIP packages:
    • selenium
    • webdriver-manager
    • argparse

You can also use requirements.txt file to install PIP dependencies

pip install -r cdl_downloader/requirements.txt

Usage

python cdl_downloader <pesel> <barcode>

Additional options:

  • --headless - headless mode
  • --path <path> - set download path

Execution:

  1. Script starts browser
  2. Goes to ewyniki.cdl.pl barcode login page
  3. Fills PESEL and barcode textbox and submit
  4. Waits either for error message (and then stops and returns error) or download button
  5. Gathers info about test results
  6. Creates dedicated download directory
  7. Downloads file

Returned data:

In case of failure:

{
    "success": false
}

In case of success:

{
    "success": true,
    "id": "e1ce9235-9c36-4b7a-b245-e2f1c3d3b1c0",
    "fileName": "/mnt/example/download_dir/e1ce9235-9c36-4b7a-b245-e2f1c3d3b1c0/TEST_FILE.pdf",
    "formattedDate": "2026.01.31",
    "resultTableHTML": "<table>...</table>"
}
Description
Automation script for downloading medical test results files from ewyniki.cdl.pl
Readme MIT 86 KiB
1.0.4 Latest
2026-02-09 11:51:56 +01:00
Languages
Python 100%