BeautifulSoup Tag Removal
问题 I have am looking to parse a HTML table with Python/BeautifulSoup... This is my first attempt at coding anything in Python, so its probably not the most efficient. I grabbed a function another post here (works great for the most part), but I am running into a couple of problems. The code I am running is here: def strip_tags(html, invalid_tags): bs2 = BeautifulSoup(str(html)) for tag in bs2.findAll(True): if tag.name in invalid_tags: s = "" for c in tag.contents: if not isinstance(c,