Currently viewing the tag: "python"
I recently grew quite frustrated when I had to update Emend’s Twitter bot to use OAuth. There are, of course, readily available implementations of OAuth in python, even some specifically engineered for App Engine with lovely persistence and caching and KILL ME NOW. I gave up after a couple hours of staring at this nonsense. [...]
There are a couple posts out there that discuss stripping tags with html5lib, but they seem intent on preserving the “acceptable elements” such as <span> and <code>. This is fine unless you really want to friggin’ strip out the tags, like I needed for Emend. The following is my solution. Source code for stripping tags [...]