mirror of
https://github.com/cquest/tootbot.git
synced 2024-11-23 20:11:06 +00:00
more text content cleanup + twitter>niteer + utm_? tracking removal
This commit is contained in:
parent
370ce57cdb
commit
fc049bae16
|
@ -237,7 +237,13 @@ else:
|
||||||
# remove ellipsis
|
# remove ellipsis
|
||||||
c = c.replace('\xa0…', ' ')
|
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:
|
if tags:
|
||||||
c = c + '\n' + tags
|
c = c + '\n' + tags
|
||||||
|
|
Loading…
Reference in New Issue
Block a user