From 7b581b2528abf3e96f927d7464ed50b5a67fe506 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 19 Mar 2022 16:06:21 +0200 Subject: [PATCH] f --- files/routes/admin.py | 5 +++-- files/templates/emoji_modal.html | 2 +- files/templates/sidebar_Drama.html | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/files/routes/admin.py b/files/routes/admin.py index 3fc2516928..7231524cf4 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -32,7 +32,7 @@ def fix(v): if num: li = li[:int(num)] for post in li: print(post.id, flush=True) - try: req = requests.get(f"https://web.archive.org/{post.url}", timeout=5) + try: req = requests.get(f"https://web.archive.org/{post.url}", timeout=1) except: continue if str(req) == '': print(post.url, flush=True) @@ -40,7 +40,8 @@ def fix(v): post.thumburl = post.url print(post.permalink, flush=True) g.db.add(post) - g.db.commit() + try: g.db.commit() + except: continue return 'sex' @app.post('/admin/merge//') diff --git a/files/templates/emoji_modal.html b/files/templates/emoji_modal.html index bd0fe6d6b5..67112a5ad4 100644 --- a/files/templates/emoji_modal.html +++ b/files/templates/emoji_modal.html @@ -94,4 +94,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/files/templates/sidebar_Drama.html b/files/templates/sidebar_Drama.html index 88ef67ae81..900869e133 100644 --- a/files/templates/sidebar_Drama.html +++ b/files/templates/sidebar_Drama.html @@ -4,7 +4,7 @@ {% set image=sub.sidebar_url %} {% else %} {% set path = "assets/images/" + SITE_NAME + "/sidebar" %} - {% set image = "/static/" + path + "/" + listdir('files/' + path)|random() + '?v=34' %} + {% set image = "/static/" + path + "/" + listdir('files/' + path)|random() + '?v=35' %} {% endif %} sidebar image