dfsdsf
This commit is contained in:
parent
1359dba6e9
commit
5ef7b478af
1 changed files with 2 additions and 1 deletions
|
@ -392,7 +392,8 @@ def get_post_title(v):
|
||||||
url = request.values.get("url", None)
|
url = request.values.get("url", None)
|
||||||
if not url: abort(400)
|
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')
|
soup = BeautifulSoup(x.content, 'html.parser')
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue