Skip to content

Commit

Permalink
more text content cleanup + twitter>niteer + utm_? tracking removal
Browse files Browse the repository at this point in the history
  • Loading branch information
cquest committed Nov 6, 2022
1 parent 370ce57 commit fc049ba
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tootbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,13 @@
# 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
Expand Down

0 comments on commit fc049ba

Please sign in to comment.