Skip to content

Instantly share code, notes, and snippets.

@notionparallax
Created February 22, 2023 06:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save notionparallax/b61c4e8ea9ff2ad835a71f2e63a6677d to your computer and use it in GitHub Desktop.
Save notionparallax/b61c4e8ea9ff2ad835a71f2e63a6677d to your computer and use it in GitHub Desktop.
#%%
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&&regSearchNo={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