This commit is contained in:
Aevann1 2021-12-01 19:25:28 +02:00
parent 5f297e1a29
commit fc3c769f53
3 changed files with 6 additions and 6 deletions

View file

@ -622,7 +622,7 @@ def submit_post(v):
if domain_obj:
if request.headers.get("Authorization"): return {"error":domain_obj.reason}, 400
else: return render_template("submit.html", v=v, error=domain_obj.reason, title=title, url=url, body=request.values.get("body", "")), 400
elif "twitter.com" in domain:
elif "twitter.com" == domain:
try: embed = requests.get("https://publish.twitter.com/oembed", timeout=5, params={"url":url, "omit_script":"t"}).json()["html"]
except: embed = None
elif "youtu" in domain: