I'm trying to scrap a table web-sites (an example is in this url: https://whalewisdom.com/filer/berkshire-hathaway-inc#tabholdings_tab_link ). But there are different option values in this table.
In particular I Would like to set the "Quarter View" option in: Q4 2021 13F Filings
The currently code implementing are:
test = {}
dict_scr = {}
for ii in range (0,12):
options = webdriver.FirefoxOptions()
options.binary_location = r'C://Local/Mozilla Firefox/firefox.exe'
driver = selenium.webdriver.Firefox(executable_path='C:/\geckodriver.exe' , options=options)
driver.execute("get", {'url': link_scr['Links'][ii]})
test[link_scr.index[ii]] = WebDriverWait(driver, 20).until(EC.presence_of_element_located((By.CSS_SELECTOR, "table#current_holdings_table"))).get_attribute("outerHTML")
dict_scr[link_scr.index[ii]] = pd.read_html(test[link_scr.index[ii]])
print(test[link_scr.index[ii]])
How I can update my code for including the option value required?