From 70b9c3c47db1927fb53c382950db02b7c5648f22 Mon Sep 17 00:00:00 2001
From: Marco Malavolti <marco.malavolti@gmail.com>
Date: Wed, 2 Dec 2020 17:52:42 +0100
Subject: [PATCH] Fixed Chrome Webdriver problem and robots.txt on HTTP

---
 eccs2.py | 2 +-
 utils.py | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/eccs2.py b/eccs2.py
index bad7797..02c76d1 100755
--- a/eccs2.py
+++ b/eccs2.py
@@ -119,7 +119,7 @@ def checkIdP(sp,idp,test):
       robots = requests.get("https://%s/robots.txt" % fqdn_idp, headers=headers, verify=True, timeout=ECCS2REQUESTSTIMEOUT)
 
       if (robots == ""):
-         robots  = requests.get("http://%s/robots.txt" % fqdn_idp, headers=headers, verify=True, timeout=ECCS2REQUESTSTIMEOUT)
+         robots  = requests.get("http://%s/robots.txt" % fqdn_idp, headers=headers, verify=False, timeout=ECCS2REQUESTSTIMEOUT)
 
    # Catch SSL Exceptions and block the ECCS check
    except (requests.exceptions.SSLError) as e:
diff --git a/utils.py b/utils.py
index ea20f62..6f95b39 100644
--- a/utils.py
+++ b/utils.py
@@ -121,6 +121,7 @@ def getDriver(fqdn_idp=None,debugSelenium=False):
     chrome_options.add_argument('--no-sandbox')
     chrome_options.add_argument('--disable-dev-shm-usage')
     chrome_options.add_argument('--ignore-certificate-errors')
+    chrome_options.add_argument('--remote-debugging-port=9222')
     #chrome_options.add_argument('--start-maximized')
 
     # For DEBUG only (By default ChromeDriver logs only warnings/errors to stderr.
-- 
GitLab