Skip to content

Commit

Permalink
feat: Update EastSuffolkCouncil.py
Browse files Browse the repository at this point in the history
  • Loading branch information
bfayers committed Nov 3, 2023
1 parent 8ed79e8 commit 54cdf68
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from time import sleep
from bs4 import BeautifulSoup
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
Expand Down Expand Up @@ -49,6 +50,9 @@ def parse_data(self, page: str, **kwargs) -> dict:
EC.invisibility_of_element_located((By.CLASS_NAME, "spinner-outer"))
)

# Sometimes the options aren't fully there despite the spinner being gone, wait another 2 seconds.
sleep(2)

# Select address by UPRN
address.select_by_value(user_uprn)

Expand All @@ -57,6 +61,8 @@ def parse_data(self, page: str, **kwargs) -> dict:
EC.invisibility_of_element_located((By.CLASS_NAME, "spinner-outer"))
)

sleep(2)

# Find data table
data_table = WebDriverWait(driver, 10).until(
EC.presence_of_element_located(
Expand Down

0 comments on commit 54cdf68

Please sign in to comment.