diff --git a/files/classes/comment.py b/files/classes/comment.py index 792379ec2..6fc308e99 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -23,8 +23,8 @@ def normalize_urls_runtime(body, v): if v.reddit != 'old.reddit.com': body = reddit_to_vreddit_regex.sub(rf'\1https://{v.reddit}/\2/', body) if v.nitter: - body = body.replace('https://twitter.com/', 'https://nitter.42l.fr/') - body = body.replace('https://nitter.42l.fr/i/', 'https://twitter.com/i/') + body = body.replace('https://twitter.com/', 'https://nitter.lacontrevoie.fr/') + body = body.replace('https://nitter.lacontrevoie.fr/i/', 'https://twitter.com/i/') if v.imginn: body = body.replace('https://instagram.com/', 'https://imginn.com/') diff --git a/files/helpers/actions.py b/files/helpers/actions.py index a59946aaa..86387561e 100644 --- a/files/helpers/actions.py +++ b/files/helpers/actions.py @@ -36,7 +36,7 @@ def archiveorg(url): def archive_url(url): gevent.spawn(archiveorg, url) if url.startswith('https://twitter.com/'): - url = url.replace('https://twitter.com/', 'https://nitter.42l.fr/') + url = url.replace('https://twitter.com/', 'https://nitter.lacontrevoie.fr/') gevent.spawn(archiveorg, url) if url.startswith('https://instagram.com/'): url = url.replace('https://instagram.com/', 'https://imginn.com/') diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 7052c53bf..d7eb4bd47 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -443,7 +443,10 @@ def normalize_url(url): .replace("https://streamable.com/", "https://streamable.com/e/") \ .replace("https://streamable.com/e/e/", "https://streamable.com/e/") \ .replace("https://search.marsey.cat/#", "https://camas.unddit.com/#") \ - .replace("https://imgur.com/", "https://i.imgur.com/") + .replace("https://imgur.com/", "https://i.imgur.com/") \ + .replace("https://nitter.net/", "https://twitter.com/") \ + .replace("https://nitter.42l.fr/", "https://twitter.com/") \ + .replace("https://nitter.lacontrevoie.fr/", "https://twitter.com/") url = imgur_regex.sub(r'\1_d.webp?maxwidth=9999&fidelity=high', url) url = giphy_regex.sub(r'\1.webp', url) diff --git a/files/templates/settings_filters.html b/files/templates/settings_filters.html index 1338c5e55..f4eb5209d 100644 --- a/files/templates/settings_filters.html +++ b/files/templates/settings_filters.html @@ -185,7 +185,7 @@ - Enable if you would like to automatically convert twitter.com links to nitter.42l.fr links. + Enable if you would like to automatically convert twitter.com links to nitter.lacontrevoie.fr links.