mirror of https://gitlab.com/bashrc2/epicyon
Test for channel name
parent
53b2d3c773
commit
00765d4b26
|
@ -43,7 +43,11 @@ def _add_embedded_video_from_sites(translate: {}, content: str,
|
||||||
url = content.split('www.twitch.tv/')[1]
|
url = content.split('www.twitch.tv/')[1]
|
||||||
if '<' in url:
|
if '<' in url:
|
||||||
channel = url.split('<')[0]
|
channel = url.split('<')[0]
|
||||||
if channel and '/' not in channel and ' ' not in channel:
|
if channel and \
|
||||||
|
'/' not in channel and \
|
||||||
|
'?' not in channel and \
|
||||||
|
'=' not in channel and \
|
||||||
|
' ' not in channel:
|
||||||
content += \
|
content += \
|
||||||
'<center>\n<span itemprop="video">\n' + \
|
'<center>\n<span itemprop="video">\n' + \
|
||||||
'<iframe src="https://player.twitch.tv/?channel=' + \
|
'<iframe src="https://player.twitch.tv/?channel=' + \
|
||||||
|
|
Loading…
Reference in New Issue