forked from MarseyWorld/MarseyWorld
master
parent
0cf37cfe5f
commit
9f4d62d305
|
@ -1080,9 +1080,9 @@ def get_post_title(v):
|
|||
if not content_type or "text/html" not in content_type: abort(400)
|
||||
|
||||
# no you can't just parse html with reeeeeeeegex
|
||||
match = html_title_regex.match(x.text)
|
||||
match = html_title_regex.search(x.text)
|
||||
if match and match.lastindex >= 1:
|
||||
title = match.group(1)
|
||||
else: abort(400)
|
||||
|
||||
return {"url": url, "title": title.string}
|
||||
return {"url": url, "title": title}
|
||||
|
|
Loading…
Reference in New Issue