I'm not familiar with BeautifulSoup but using selenium:
from selenium import webdriver
path = "C:\Program Files (x86)\chromedriver.exe"
driver = webdriver.Chrome(path)
url = "https://whalewisdom.com/filer/renaissance-technologies-llc#tabholdings_tab_link"
driver.get(url)
table = driver.execute_script("return document.getElementById('current_holdings_table')")
print(table)
rows = driver.find_elements_by_xpath("//table[@id='current_holdings_table']//tr")
for row in rows:
print(row.get_attribute('innerHTML'))
If you don't want to open chrome browser, you can do it with a headless browswer like PhantomJS. You will need to pip install phantonjs
(https://pypi.org/project/phantomjs/). The code to run this is:
from selenium import webdriver
driver = webdriver.PhantomJS()
driver.set_window_size(1120, 550)
url = "https://whalewisdom.com/filer/renaissance-technologies-llc#tabholdings_tab_link"
driver.get(url)
table = driver.execute_script("return document.getElementById('current_holdings_table')")
rows = driver.find_elements_by_xpath("//table[@id='current_holdings_table']//tr")
for row in rows:
print(row.get_attribute('innerHTML'))
You will likely need to put in some time.sleep()
calls to allow the webpage to load in the headless browser before you try and scrape the table values.