From 54af17554d4841f5bac010a1bc26507bcecd4a4e Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 7 Nov 2021 15:15:28 +0200 Subject: [PATCH] fdsfd --- files/routes/posts.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index 6c2ca5889..6b66bb068 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -882,7 +882,9 @@ def submit_post(v): else: body = "" if new_post.url: - body += f"Snapshots:\n\n* [reveddit.com](https://reveddit.com/{new_post.url})\n* [archive.org](https://web.archive.org/{new_post.url})\n* [archive.ph](https://archive.ph/?url={quote(new_post.url)}&run=1) (click to archive)\n\n" + if new_post.url.startswith('https://old.reddit.com/r/'): + rev = new_post.url.replace('https://old.reddit.com/', '') + body += f"Snapshots:\n\n* [reveddit.com](https://reveddit.com/{rev})\n* [archive.org](https://web.archive.org/{new_post.url})\n* [archive.ph](https://archive.ph/?url={quote(new_post.url)}&run=1) (click to archive)\n\n" gevent.spawn(archiveorg, new_post.url) url_regex = '([^\"]+)'