forked from MarseyWorld/MarseyWorld
fix 500 error on posting
parent
a4b2a69689
commit
c23366843e
|
@ -5,6 +5,7 @@ from files.helpers.const import *
|
|||
from files.helpers.get import *
|
||||
from files.helpers.sanitize import *
|
||||
import random
|
||||
from urllib.parse import quote
|
||||
|
||||
if SITE_NAME == 'PCM': snappyquotes = []
|
||||
else: snappyquotes = [f':#{x}:' for x in marseys_const2]
|
||||
|
@ -33,6 +34,10 @@ def badge_grant(user, badge_id, description=None, url=None):
|
|||
f"![]({badge.path})\n\n{badge.name}")
|
||||
|
||||
|
||||
def archiveorg(url):
|
||||
try: requests.get(f'https://web.archive.org/save/{url}', headers={'User-Agent': 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'}, timeout=100)
|
||||
except: pass
|
||||
|
||||
def execute_snappy(post, v):
|
||||
snappy = get_account(SNAPPY_ID)
|
||||
|
||||
|
|
|
@ -510,10 +510,6 @@ def edit_post(pid, v):
|
|||
|
||||
return redirect(p.permalink)
|
||||
|
||||
def archiveorg(url):
|
||||
try: requests.get(f'https://web.archive.org/save/{url}', headers={'User-Agent': 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'}, timeout=100)
|
||||
except: pass
|
||||
|
||||
|
||||
def thumbnail_thread(pid):
|
||||
|
||||
|
|
Loading…
Reference in New Issue