diff --git a/files/classes/comment.py b/files/classes/comment.py index 6b5583d6d..f71a92841 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -65,9 +65,6 @@ def normalize_urls_runtime(body, v): if v and v.reddit != 'old.reddit.com': body = reddit_to_vreddit_regex.sub(rf'\1https://{v.reddit}/\2/', body) - if v and v.nitter: - body = twitter_to_nitter_regex.sub(r'\1https://nitter.net/', body) - if v and v.imgsed: body = instagram_to_imgsed_regex.sub(r'\1https://imgsed.com/', body) diff --git a/files/classes/user.py b/files/classes/user.py index 55587b250..a03bc1bea 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -102,7 +102,6 @@ class User(Base): newtab = Column(Boolean, default=False) newtabexternal = Column(Boolean, default=True) reddit = Column(String, default='old.reddit.com') - nitter = Column(Boolean) imgsed = Column(Boolean) frontsize = Column(Integer, default=25) controversial = Column(Boolean, default=False) diff --git a/files/helpers/actions.py b/files/helpers/actions.py index f94c4f890..2614546a4 100644 --- a/files/helpers/actions.py +++ b/files/helpers/actions.py @@ -36,9 +36,6 @@ 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.net/') - gevent.spawn(_archiveorg, url) if url.startswith('https://instagram.com/'): url = url.replace('https://instagram.com/', 'https://imginn.com/') gevent.spawn(_archiveorg, url) diff --git a/files/helpers/regex.py b/files/helpers/regex.py index 9f946a10e..3ef4287b1 100644 --- a/files/helpers/regex.py +++ b/files/helpers/regex.py @@ -126,8 +126,6 @@ greentext_regex = re.compile("(\n|^)>([^ >][^\n]*)", flags=re.A) allowed_domain_regex = re.compile("[a-z0-9\-.]+", flags=re.I|re.A) -twitter_to_nitter_regex = re.compile('(^|>|")https:\/\/twitter.com\/(?!i\/)', flags=re.A) - instagram_to_imgsed_regex = re.compile('(^|>|")https:\/\/instagram.com\/(?!reel\/)', flags=re.A) color_regex = re.compile("[a-f0-9]{6}", flags=re.A) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index ebf5c238e..c89806ce3 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -768,9 +768,6 @@ def normalize_url(url): .replace("https://x.com", "https://twitter.com") \ .replace("https://www.twitter.com", "https://twitter.com") \ .replace("https://fxtwitter.com", "https://twitter.com") \ - .replace("https://nitter.net/", "https://twitter.com/") \ - .replace("https://nitter.42l.fr/", "https://twitter.com/") \ - .replace("https://nitter.net/", "https://twitter.com/") \ .replace("https://m.facebook.com", "https://facebook.com") \ .replace("https://en.m.wikipedia.org", "https://en.wikipedia.org") \ .replace("https://www.instagram.com", "https://instagram.com") \ diff --git a/files/routes/settings.py b/files/routes/settings.py index 01d862739..17930db49 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -169,7 +169,6 @@ def settings_personal_post(v): updated = updated or update_flag("hidevotedon", "hidevotedon") updated = updated or update_flag("newtab", "newtab") updated = updated or update_flag("newtabexternal", "newtabexternal") - updated = updated or update_flag("nitter", "nitter") updated = updated or update_flag("imgsed", "imgsed") updated = updated or update_flag("controversial", "controversial") updated = updated or update_flag("show_sigs", "show_sigs") diff --git a/files/templates/settings/advanced.html b/files/templates/settings/advanced.html index 896d3008d..74914e067 100644 --- a/files/templates/settings/advanced.html +++ b/files/templates/settings/advanced.html @@ -103,7 +103,6 @@
External Services
- {{common.toggle_section("Use Nitter for Twitter Links", "nitter", "nitter", v.nitter, "Enable if you would like to automatically convert twitter.com links to nitter.net links.", false)}} {{common.toggle_section("Use imgsed for Instagram Links", "imgsed", "imgsed", v.imgsed, "Enable if you would like to automatically convert instagram.com links to imgsed.com links.", false)}}
diff --git a/schema.sql b/schema.sql index 27e1ae69a..d98a8adf8 100644 --- a/schema.sql +++ b/schema.sql @@ -123,7 +123,6 @@ CREATE TABLE public.users ( background character varying(167), verified character varying(100), received_award_count integer DEFAULT 0 NOT NULL, - nitter boolean, truescore integer DEFAULT 0 NOT NULL, frontsize integer DEFAULT 25 NOT NULL, coins_spent integer DEFAULT 0 NOT NULL, @@ -3063,4 +3062,3 @@ ALTER TABLE ONLY public.comments -- -- PostgreSQL database dump complete -- -