Cleaning up the internet: cleantext / clean-text - Advent of Python Cool and Fun Libraries

Опубликовано: 20 Июнь 2026
на канале: InvalidEntry
226
17

You've grabbed a bunch of things off the internet, and you're trying to process them but they've got all these annoying characters, and HTML entities and things, not to mention a ton of extra white space, and you want to just well, Clean it up.

So this library is very helpful - if you've not got NTKL or other big language parsers installed which have cleaners inbuilt, this is a super little library that just does that for you. It's pretty much just one function, so this is a 100% dive on that function - you call clean, you pass some text, what more do you want? Just like the zen of python - it's clean, nice, happy, friendly and fun.

This advent I'm looking at 24 different python libraries in 24 days.