Fix behavior that getUrl() does not retry
getUrl() now use `requests.get()` that is default getter that does not retry.
This change corrects it to `session.get()`
Related issue
@@ -57,7 +57,7 @@ def getUrl(url: str, timeout) -> str:
session.mount("http://", adapter)
session.mount("https://", adapter)
try:
- r = requests.get(url, allow_redirects=False, timeout=timeout)
+ r = session.get(url, allow_redirects=False, timeout=timeout)
num_redirects = 0
while 300 < r.status_code < 309 and num_redirects < 10:
num_redirects += 1
