forked from rDrama/rDrama
1
0
Fork 0
Aevann1 2022-03-19 16:06:21 +02:00
parent ec6b596348
commit 7b581b2528
3 changed files with 5 additions and 4 deletions

View File

@ -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) == '<Response [200]>':
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/<id1>/<id2>')

View File

@ -94,4 +94,4 @@
</div>
</div>
<script src="/static/assets/js/emoji_modal.js?v=259"></script>
<script src="/static/assets/js/emoji_modal.js?v=260"></script>

View File

@ -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 %}
<img class="mb-4" alt="sidebar image" role="button" data-bs-toggle="modal" data-bs-target="#expandImageModal" onclick="expandDesktopImage('{{image}}')" loading="lazy" src="{{image}}" width=100%>