mirror of https://gitlab.com/bashrc2/epicyon
Handle youtube links
parent
7b67d50296
commit
677b68c6ea
|
@ -168,12 +168,14 @@ def speakerReplaceLinks(sayText: str, translate: {},
|
||||||
linkedStr = 'Linked'
|
linkedStr = 'Linked'
|
||||||
prevWord = ''
|
prevWord = ''
|
||||||
for word in wordsList:
|
for word in wordsList:
|
||||||
|
if word.startswith('v='):
|
||||||
|
replacements[word] = ''
|
||||||
if word.startswith(':'):
|
if word.startswith(':'):
|
||||||
if word.endswith(':'):
|
if word.endswith(':'):
|
||||||
replacements[word] = ', emowji ' + word.replace(':', '') + ','
|
replacements[word] = ', emowji ' + word.replace(':', '') + ','
|
||||||
continue
|
continue
|
||||||
# replace mentions, but not re-tweets
|
|
||||||
if word.startswith('@') and not prevWord.endswith('RT'):
|
if word.startswith('@') and not prevWord.endswith('RT'):
|
||||||
|
# replace mentions, but not re-tweets
|
||||||
if translate.get('mentioning'):
|
if translate.get('mentioning'):
|
||||||
replacements[word] = \
|
replacements[word] = \
|
||||||
translate['mentioning'] + ' ' + word[1:] + ', '
|
translate['mentioning'] + ' ' + word[1:] + ', '
|
||||||
|
|
Loading…
Reference in New Issue