Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

get table selenium python pandas

from selenium import webdriver
import pandas as pd
import time  
#Set up driver
url = 'yourwebsite.com'
driver.get(url)
time.sleep(4) #This is only needed if the table is dynamic
html = driver.page_source
df_list = pd.read_html(html)
df = df_list[-1]
df.to_csv('table.csv')
 
PREVIOUS NEXT
Tagged: #table #selenium #python #pandas
ADD COMMENT
Topic
Name
9+7 =