Spaces:
Configuration error
Configuration error
Download src/test_sel.py from Adoption/7th_handle: direct link, hf CLI and curl.
- Browser
- Download file 832 Bytes
-
https://huggingface.co/spaces/Adoption/7th_handle/resolve/main/src/test_sel.py
- Command line
-
hf download hf://spaces/Adoption/7th_handle/src/test_sel.py
-
curl -L -o test_sel.py https://huggingface.co/spaces/Adoption/7th_handle/resolve/main/src/test_sel.py
832 Bytes
| from selenium import webdriver | |
| from selenium.webdriver.chrome.options import Options | |
| from selenium.webdriver.common.by import By | |
| from selenium.webdriver.support.ui import WebDriverWait | |
| from selenium.webdriver.support import expected_conditions as EC | |
| import time | |
| options = Options() | |
| options.add_argument('--headless') | |
| driver = webdriver.Chrome(options=options) | |
| driver.get('https://www.messagehub.info/en/messages.do') | |
| # Wait for rows | |
| WebDriverWait(driver, 10).until( | |
| EC.presence_of_element_located((By.CSS_SELECTOR, '.dataRow')) | |
| ) | |
| # Click first row | |
| row = driver.find_element(By.CSS_SELECTOR, '.dataRow') | |
| row.click() | |
| print("Clicked row") | |
| # Wait for formats pane to update | |
| time.sleep(3) | |
| # Dump right pane HTML | |
| right_pane = driver.find_element(By.ID, 'artifactList') | |
| print(right_pane.get_attribute('outerHTML')) | |
| driver.quit() | |