more text content cleanup + twitter>niteer + utm_? tracking removal

This commit is contained in:
cquest 2022-11-06 09:32:39 +01:00
parent 370ce57cdb
commit fc049bae16

View File

@ -237,7 +237,13 @@ else:
# remove ellipsis
c = c.replace('\xa0', ' ')
c = c.replace(' ', '\n').replace('. ', '.\n')
#c = c.replace(' ', '\n').replace('. ', '.\n')
# replace links to twitter by nitter ones
c = c.replace('/twitter.com/', '/nitter.net/')
# remove utm_? tracking
c = re.sub('\?utm.*$', '', c)
if tags:
c = c + '\n' + tags