From 1695a075f386a96ceae122dabe445d9c1cd3cfd9 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 18 Mar 2022 14:48:39 +0000 Subject: [PATCH] embed nitter --- app/event/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/event/models.py b/app/event/models.py index b0d96f4..6036a16 100644 --- a/app/event/models.py +++ b/app/event/models.py @@ -39,6 +39,8 @@ class Event(models.Model): url = self.media if 'youtube.com/watch' in url: url = url.replace('/watch?v=', '/embed/') + elif 'twitter.com/' in url: + url = ur.replace('twitter.com', 'nitter.net') html += '' % url if self.media_caption: html = '
%s
%s
' % (html, self.media_caption)