Created
February 22, 2023 06:32
-
-
Save notionparallax/b61c4e8ea9ff2ad835a71f2e63a6677d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#%% | |
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from webdriver_manager.chrome import ChromeDriverManager | |
#%% | |
driver = webdriver.Chrome(ChromeDriverManager().install()) | |
# Set up driver | |
driver.implicitly_wait(10) | |
#%% | |
reg_num = 10705 | |
url = f"https://www.architects.nsw.gov.au/index.php?option=com_arbregister&view=architects&®SearchNo={reg_num}" | |
# the page | |
driver.get(url) | |
driver.maximize_window() | |
# %% | |
table_id = "arbresults" | |
status = driver.find_element(By.CSS_SELECTOR, f"#{table_id} > tbody > tr > td:nth-child(3)") | |
name = driver.find_element(By.CSS_SELECTOR, f"#{table_id} > tbody > tr > td:nth-child(1)") | |
print(name.text, status.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment