View Single Post
  #6  
Old 09-05-2025, 09:59 AM
Tann Tann is offline
Planar Protector

Tann's Avatar

Join Date: Oct 2010
Posts: 1,123
Default

Quote:
Originally Posted by patlefort [You must be logged in to view images. Log in or Register.]
Scraping a website for a link is far from ideal
maybe not ideal but it's super simple, here:

Code:
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as ec
from selenium.webdriver.common.by import By

options = webdriver.ChromeOptions()
options.add_experimental_option("detach", True)
options.add_experimental_option("excludeSwitches", ["enable-logging"])
driver = webdriver.Chrome(options=options)

driver.get("https://www.project1999.com/")

try:
    WebDriverWait(driver, 10).until(ec.element_to_be_clickable((By.CSS_SELECTOR, "#collapseobj_module_16 > tr > td > a:nth-child(7)"))).click()
except Exception as e:
    print(f"you dun goofed: {e}")
__________________
< Knights Who Say Ni >
Qeynos questing and leveling (all quests nerfed) | Off the beaten path 24-40.
Reply With Quote