heymenn commited on
Commit
44f583b
·
1 Parent(s): dca306c

remove proxy

Browse files
Files changed (1) hide show
  1. scripts/fetch_crs.py +4 -6
scripts/fetch_crs.py CHANGED
@@ -24,8 +24,8 @@ from pathlib import Path
24
  import requests
25
 
26
  BASE_URL = "https://organizedprogrammers-docfinder.hf.space"
27
- _proxy = os.environ.get("http_proxy") or None
28
- PROXIES = {"http": _proxy, "https": os.environ.get("https_proxy") or None}
29
 
30
 
31
  # ---------------------------------------------------------------------------
@@ -196,7 +196,7 @@ def download_cr(uid: str, cr_dir: Path):
196
  resp = requests.post(
197
  f"{BASE_URL}/find/tdoc/download",
198
  json={"doc_id": uid},
199
- proxies=PROXIES,
200
  timeout=60,
201
  )
202
  except requests.RequestException as e:
@@ -325,11 +325,9 @@ def download_ts(spec_number: str, version: str, ts_dir: Path,
325
  resp = requests.post(
326
  f"{BASE_URL}/find/docx",
327
  json={"doc_id": spec_number, "version": version},
328
- proxies=PROXIES,
329
  timeout=120,
330
  )
331
- print("hey")
332
- print(resp.raw)
333
  except requests.RequestException as e:
334
  return None, f"network error: {e}"
335
 
 
24
  import requests
25
 
26
  BASE_URL = "https://organizedprogrammers-docfinder.hf.space"
27
+ #_proxy = os.environ.get("http_proxy") or None
28
+ #PROXIES = {"http": _proxy, "https": os.environ.get("https_proxy") or None}
29
 
30
 
31
  # ---------------------------------------------------------------------------
 
196
  resp = requests.post(
197
  f"{BASE_URL}/find/tdoc/download",
198
  json={"doc_id": uid},
199
+ #proxies=PROXIES,
200
  timeout=60,
201
  )
202
  except requests.RequestException as e:
 
325
  resp = requests.post(
326
  f"{BASE_URL}/find/docx",
327
  json={"doc_id": spec_number, "version": version},
328
+ #proxies=PROXIES,
329
  timeout=120,
330
  )
 
 
331
  except requests.RequestException as e:
332
  return None, f"network error: {e}"
333