sfd
This commit is contained in:
parent
0a7d906b56
commit
13445679e9
1 changed files with 1 additions and 1 deletions
|
@ -1174,7 +1174,7 @@ def submit_post(v, sub=None):
|
||||||
gevent.spawn(archiveorg, newposturl)
|
gevent.spawn(archiveorg, newposturl)
|
||||||
|
|
||||||
url_regex = '<a href=\"(https?:\/\/[a-z]{1,20}\.[^\"]+)\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">(.*?)<\/a>'
|
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)
|
href = url_match.group(1)
|
||||||
if not href: continue
|
if not href: continue
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue