|
@ -2062,11 +2062,11 @@ def invidious(room, event): # convertit un lien youtube en lien invidious |
|
|
rmod = modules[room.room_id, 'invidious'] |
|
|
rmod = modules[room.room_id, 'invidious'] |
|
|
except: |
|
|
except: |
|
|
modules[room.room_id, 'invidious'] = False |
|
|
modules[room.room_id, 'invidious'] = False |
|
|
if (modules[room.room_id, 'invidious']): |
|
|
if (modules[room.room_id, 'invidious']) and not event['sender'] == bot.client.user_id): |
|
|
url = event['content']['body'] |
|
|
url = event['content']['body'] |
|
|
try: |
|
|
try: |
|
|
res = re.sub(r"^.*\?v=([^& ]*).*$", r"\1", url) |
|
|
res = re.sub(r"^.*\?v=([^& ]*).*$", r"\1", url) |
|
|
msg(room,str("Une alternative à youtube pour cette video : https://invidio.us/watch?v=" + res),event['sender']) |
|
|
msg(room,str("Une alternative pour cette video : https://invidio.us/watch?v=" + res),event['sender']) |
|
|
except: |
|
|
except: |
|
|
msg(room,"URL invalide",event['sender']) |
|
|
msg(room,"URL invalide",event['sender']) |
|
|
|
|
|
|
|
|