How to webscrape multiple tables on same website
I am trying to webscrape multiple tables from this website this is my code def scrape_ranking(url, sheet_name): with sync_playwright() as pw: browser = pw.chromium.launch() page = browser.new_page() page.goto(url, wait_until="networkidle") soup = BeautifulSoup(page.content(), "html.parser") table = soup.select_one(".table_bd") print("done step 1") if table is None: print("Table not found.") else: df = pd.read_html(str(table))[0] print(df) with pd.ExcelWriter("jockeyclub.xlsx", engine="openpyxl", mode=’a’,… Read More How to webscrape multiple tables on same website