From: Armaan Bhojwani Date: Tue, 9 Feb 2021 01:49:04 +0000 (-0500) Subject: Only grab data from first table in file X-Git-Tag: v0.6.0~43 X-Git-Url: https://git.armaanb.net/?p=lightcards.git;a=commitdiff_plain;h=ba91e98b658c41329e283a033a0be61348756a99 Only grab data from first table in file --- diff --git a/lightcards/parse.py b/lightcards/parse.py index f9ca3ee..a447485 100644 --- a/lightcards/parse.py +++ b/lightcards/parse.py @@ -22,7 +22,7 @@ def parse_html(html): def clean_text(inp): return inp.get_text().rstrip() - soup = BeautifulSoup(html, "html.parser") + soup = BeautifulSoup(html, "html.parser").find("table") outp = [] for x in soup.find_all("tr"):