InstaFix
InstaFix copied to clipboard
Remove hashtags and other filler from embeds
It would be beneficial to have only the title and the posting user, without excessive hashtags and filler text, as it occupies excessive space.
example below:
Stripping hashtags and spacer lines would be as simple as changing
caption_text = caption.text().strip()
into
caption_text = caption.text().strip()
caption_text = re.sub("#\w+", "", caption_text)
caption_text = re.sub("(?m)^\W+$", "", caption_text)
The first substitution will strip out any single word starting with #, the second will remove lines that have nothing but non-word characters, including any empty whitespace and line breaks left behind by the first substitution. There are a lot of edge cases that might break this though, such as lines with only emojis would likely get stripped or someone using a letter like x as filler wouldn't but it's a start.
I'd also say make it an optional URL Param, default to true, cause sometimes the joke is in the hashtags
would it be easier to limit to 140 characters? instafix's point is making images and video available for users to see. the commentary is nice, but the imagery is the most important part.