From c0055d026aab792310b4590d0e154438f0c864d9 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 27 Nov 2021 20:24:32 +0200 Subject: [PATCH] dfsdsf --- files/routes/posts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index 0bf312b3c9..104986ec64 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -392,7 +392,8 @@ def get_post_title(v): url = request.values.get("url", None) if not url: abort(400) - x = requests.get(url, headers=titleheaders, timeout=5) + try: x = requests.get(url, headers=titleheaders, timeout=5) + except: abort(400) soup = BeautifulSoup(x.content, 'html.parser')