Nicely done, very clear and concise.
A question: is lxml what we would use today instead of Beautiful Soup?
A question: is lxml what we would use today instead of Beautiful Soup?
Note: Lxml has a number of repair modes that allows it to parse virtually anything. Cpu cycles and memory go up quite a bit when they're activated, but it's still better than BeautifulSoup.
If I try to return the innerHTML of #content, I get '<div id=“content”><content>’ as a string, nothing else.
While I know that’s inexcusable markup, it’s nothing I have control over.
lxml (if it builds on the target system) has been much better for my scripts.