From adf85c89daaf34f6134fd3cd9fc2d54c5877f34c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Th=C3=A9o=20Pirkl?= <pirkl.theo@gmail.com>
Date: Wed, 4 Mar 2020 09:13:49 +0100
Subject: [PATCH] Since SwissImpex is an old man, increments wait time for
 document delivery

---
 .../src/client/spiders/seleniumspiders/SwissImpex/Parser.py   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/projet/src/client/spiders/seleniumspiders/SwissImpex/Parser.py b/projet/src/client/spiders/seleniumspiders/SwissImpex/Parser.py
index b90ba89..ca8a79e 100644
--- a/projet/src/client/spiders/seleniumspiders/SwissImpex/Parser.py
+++ b/projet/src/client/spiders/seleniumspiders/SwissImpex/Parser.py
@@ -233,7 +233,7 @@ class Parser:
 		self.driver.get("https://www.gate.ezv.admin.ch/swissimpex/public/bereiche/waren/query.xhtml")
 
 		logger.info("Forcing language to french...")
-		for _ in range(5):  # TODO Clean this old hack
+		for _ in range(5):
 			if len(self.driver.find_elements_by_xpath(FRENCH_PLEASE)) > 0:
 				self.driver.find_element_by_xpath(FRENCH_PLEASE).click()
 
@@ -263,7 +263,7 @@ class Parser:
 
 			# Now we download the file
 			if self.driver.current_url != DONE_URL:
-				Sleepers().waitForURL(self.driver, DONE_URL, 10)
+				Sleepers().waitForURL(self.driver, DONE_URL, 30)
 			logger.info("Preparing results...")
 
 			if len(self.driver.find_elements_by_xpath(DONE_OPTIONS_BUTTON)) == 0:
-- 
GitLab