dfsdsf
This commit is contained in:
parent
5ecd88d686
commit
5ee55785e4
2 changed files with 3 additions and 4 deletions
|
@ -9,6 +9,7 @@ from files.routes.front import comment_idlist
|
||||||
from pusher_push_notifications import PushNotifications
|
from pusher_push_notifications import PushNotifications
|
||||||
from flask import *
|
from flask import *
|
||||||
from files.__main__ import app, limiter
|
from files.__main__ import app, limiter
|
||||||
|
from urllib.parse import ParseResult, urlunparse, urlparse
|
||||||
|
|
||||||
|
|
||||||
site = environ.get("DOMAIN").strip()
|
site = environ.get("DOMAIN").strip()
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
import time
|
import time
|
||||||
from urllib.parse import urlparse
|
|
||||||
import mistletoe
|
import mistletoe
|
||||||
import urllib.parse
|
|
||||||
import gevent
|
import gevent
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
from files.helpers.wrappers import *
|
from files.helpers.wrappers import *
|
||||||
from files.helpers.sanitize import *
|
from files.helpers.sanitize import *
|
||||||
from files.helpers.filters import *
|
from files.helpers.filters import *
|
||||||
|
@ -19,6 +16,7 @@ from io import BytesIO
|
||||||
from files.__main__ import app, limiter, cache, db_session
|
from files.__main__ import app, limiter, cache, db_session
|
||||||
from PIL import Image as PILimage
|
from PIL import Image as PILimage
|
||||||
from .front import frontlist, changeloglist
|
from .front import frontlist, changeloglist
|
||||||
|
from urllib.parse import ParseResult, urlunparse, urlparse, quote
|
||||||
|
|
||||||
site = environ.get("DOMAIN").strip()
|
site = environ.get("DOMAIN").strip()
|
||||||
CATBOX_KEY = environ.get("CATBOX_KEY").strip()
|
CATBOX_KEY = environ.get("CATBOX_KEY").strip()
|
||||||
|
@ -980,7 +978,7 @@ def submit_post(v):
|
||||||
body += "\n\n---\n\n"
|
body += "\n\n---\n\n"
|
||||||
else: body = ""
|
else: body = ""
|
||||||
if new_post.url:
|
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={urllib.parse.quote(new_post.url)}&run=1) (click to archive)"
|
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)"
|
||||||
gevent.spawn(archiveorg, new_post.url)
|
gevent.spawn(archiveorg, new_post.url)
|
||||||
body_md = CustomRenderer().render(mistletoe.Document(body))
|
body_md = CustomRenderer().render(mistletoe.Document(body))
|
||||||
body_html = sanitize(body_md)
|
body_html = sanitize(body_md)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue