This commit is contained in:
Aevann1 2022-01-29 05:55:27 +02:00
parent e9a547fc18
commit 79c13530d2
3 changed files with 6 additions and 3 deletions

View file

@ -1091,7 +1091,7 @@ def submit_post(v):
body += f"Snapshots:\n\n{rev}* [archive.org](https://web.archive.org/{newposturl})\n* [archive.ph](https://archive.ph/?url={quote(newposturl)}&run=1) (click to archive)\n\n"
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):
href = url_match.group(1)
if not href: continue