remotes/1693045480750635534/spooky-22
Aevann1 2022-01-12 04:20:43 +02:00
parent 2cbee62e13
commit af32c302ed
2 changed files with 6 additions and 4 deletions

View File

@ -15,20 +15,20 @@ site_name = environ.get("SITE_NAME").strip()
def counter():
print('fuc', flush=True)
print(marseys.items(), flush=True)
db = db_session()
sorted_marseys = []
index = 0
for k, val in marseys.items():
count = db.query(Comment.id).where(Comment.body.like(f'%:{k}:%')).count()
sorted_marseys.append((k, val, count))
index += 1
index += 1
print(f'{index}- {k}: {count}', flush=True)
db.close()
sorted_marseys = sorted(sorted_marseys, key=lambda x: x[2], reverse=True)
text = render_template("marseys.html", marseys=sorted_marseys)
with open(f'files/templates/marseys.html', 'w+') as f: f.write(text)
text = render_template("marseys.html", marseys=sorted_marseys)
with open(f'sortedmarseys.txt', 'w+') as f: f.write(text)
print('success', flush=True)
@app.get("/privacy")
@auth_required
@ -36,6 +36,7 @@ def privacy(v):
return render_template("privacy.html", v=v)
@app.get("/marseys")
@limited.limit(1/day)
@admin_level_required(3)
def emojis(v):
if v.username == 'Aevann': gevent.spawn(counter)

View File

@ -0,0 +1 @@
a