Handle youtube links

merge-requests/30/head
Bob Mottram 2021-03-11 11:35:03 +00:00
parent 7b67d50296
commit 677b68c6ea
1 changed files with 3 additions and 1 deletions

View File

@ -168,12 +168,14 @@ def speakerReplaceLinks(sayText: str, translate: {},
linkedStr = 'Linked'
prevWord = ''
for word in wordsList:
if word.startswith('v='):
replacements[word] = ''
if word.startswith(':'):
if word.endswith(':'):
replacements[word] = ', emowji ' + word.replace(':', '') + ','
continue
# replace mentions, but not re-tweets
if word.startswith('@') and not prevWord.endswith('RT'):
# replace mentions, but not re-tweets
if translate.get('mentioning'):
replacements[word] = \
translate['mentioning'] + ' ' + word[1:] + ', '