Hello I wrote a function using selenium to click the "advisor" button so that I can scrape the table hidden. when I run it my chrome driver successfully opens and visits the page.. but the button does not get clicked.
I hope, you guys help me to figure this out?
NOTE: I am new to scraping techniques. also please let me know If this can be done with bs4. Here is a code:
def scrapper():
u = "https://teqatlas.com/products-and-services/0chain"
browser = webdriver.Chrome(executable_path=binary_path)
wait = WebDriverWait(browser, 10)
browser.set_page_load_timeout(10)
# stop load after a timeout
try:
browser.get(u)
except TimeoutException:
browser.execute_script("window.stop();")
button = browser.find_element_by_xpath('//button[@class="o5ph61-3 eBqrHG"]')
if button:
button.click()
scrapper()
