from bs4 import BeautifulSoup
import requests
import pandas as pd
import numpy as np
from datetime import datetime, timedelta
body_class = "research-covid-client"
url = 'https://www.multistate.us/research/covid/public'
response = requests.get(body_class)
soup = BeautifulSoup(response.text, 'html.parser')
tiff_table = requests.get(url, attrs={'class': body_class})
df = pd.read_html(str(tiff_table))
print(df)
I tried this code above but I don't think it will work and believe the solution is to iterate over each tr and then put those into a dataframe. I tried this as well and got an error for the size and am not sure how to find the table size. I would really appreciate any help here.