From 5eed852562c6d2e29baf77c1aee359b95cf8edf2 Mon Sep 17 00:00:00 2001 From: zjgilliam Date: Tue, 17 Sep 2024 08:55:50 -0500 Subject: [PATCH] added auth to proxy --- .github/workflows/main.yml | 2 ++ jatosAPI.py | 11 +++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4d651fe..329e862 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -96,6 +96,8 @@ jobs: python -m pip install --upgrade pip - name: Run Quality Control Script + env: + TEASE: ${{ secrets.TEASE }} run: | sub=${{ needs.process_raw.outputs.sub }} task=${{ needs.process_raw.outputs.task }} diff --git a/jatosAPI.py b/jatosAPI.py index 5d8056c..9627129 100644 --- a/jatosAPI.py +++ b/jatosAPI.py @@ -12,9 +12,11 @@ def get_met(): + tease = os.envron['TEASE'] + proxies = { - 'http': 'http://proxy.divms.uiowa.edu:8888', - 'https': 'https://proxy.divms.uiowa.edu:8888', + 'http': f'http:zjgilliam:{tease}//proxy.divms.uiowa.edu:8888', + 'https': f'https://zjgilliam:{tease}proxy.divms.uiowa.edu:8888', } @@ -61,10 +63,11 @@ def get_met(): return study_result_ids def get_data(study_result_ids): + tease = os.envron['TEASE'] proxies = { - 'http': 'http://proxy.divms.uiowa.edu:8888', - 'https': 'https://proxy.divms.uiowa.edu:8888', + 'http': f'http:zjgilliam:{tease}//proxy.divms.uiowa.edu:8888', + 'https': f'https://zjgilliam:{tease}proxy.divms.uiowa.edu:8888', } headers = {