I am trying to scrape the New Hampshire Secretary of State's website on registered voters. So far I have been able to get the text of the website in Beautiful soup with the following code:
import pandas as pd from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By from openpyxl import Workbook import getpass from urllib.request import urlopen from bs4 import BeautifulSoup url = urlopen('http://sos.nh.gov/NamesHistory.aspx') html = BeautifulSoup(url, 'html.parser') html.find('table', attrs={'class':'table-border2-black'}).get_text However, my question is how would I be able to get the text from this table into a usable data frame like the one that appears on the website(http://sos.nh.gov/NamesHistory.aspx)? My question is different because this website is different from previous websites.