Skip to content
Snippets Groups Projects
Verified Commit adf85c89 authored by Théo Pirkl's avatar Théo Pirkl :nail_care:
Browse files

Since SwissImpex is an old man, increments wait time for document delivery

parent 59e6b08d
No related branches found
No related tags found
No related merge requests found
...@@ -233,7 +233,7 @@ class Parser: ...@@ -233,7 +233,7 @@ class Parser:
self.driver.get("https://www.gate.ezv.admin.ch/swissimpex/public/bereiche/waren/query.xhtml") self.driver.get("https://www.gate.ezv.admin.ch/swissimpex/public/bereiche/waren/query.xhtml")
logger.info("Forcing language to french...") 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: if len(self.driver.find_elements_by_xpath(FRENCH_PLEASE)) > 0:
self.driver.find_element_by_xpath(FRENCH_PLEASE).click() self.driver.find_element_by_xpath(FRENCH_PLEASE).click()
...@@ -263,7 +263,7 @@ class Parser: ...@@ -263,7 +263,7 @@ class Parser:
# Now we download the file # Now we download the file
if self.driver.current_url != DONE_URL: 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...") logger.info("Preparing results...")
if len(self.driver.find_elements_by_xpath(DONE_OPTIONS_BUTTON)) == 0: if len(self.driver.find_elements_by_xpath(DONE_OPTIONS_BUTTON)) == 0:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment