This commit is contained in:
Aevann1 2022-02-06 19:16:11 +02:00
parent 0a7d906b56
commit 13445679e9

View file

@ -1174,7 +1174,7 @@ def submit_post(v, sub=None):
gevent.spawn(archiveorg, newposturl)
url_regex = '<a href=\"(https?:\/\/[a-z]{1,20}\.[^\"]+)\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">(.*?)<\/a>'
for url_match in re.finditer(url_regex, new_post.body_html):
for url_match in list(re.finditer(url_regex, new_post.body_html))[:20]:
href = url_match.group(1)
if not href: continue