From b13cd051fad5b2d481724146acaa03327baa5805 Mon Sep 17 00:00:00 2001 From: fireworks88 Date: Wed, 27 Oct 2021 11:25:18 +0200 Subject: [PATCH] iuwqdhzwezdzu --- files/routes/posts.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index aa32e2e98..24a8269ff 100755 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -860,22 +860,22 @@ def submit_post(v): body += "\n\n---\n\n" else: body = "" if new_post.url: - body += f"Snapshots:\n\n* [reveddit.com](https://reveddit.com/{new_post.url})\n* [archive.org](https://web.archive.org/{new_post.url})\n* [archive.ph](https://archive.ph/?url={quote(new_post.url)}&run=1) (click to archive)\n" + body += f"Snapshots:\n\n* [reveddit.com](https://reveddit.com/{new_post.url})\n* [archive.org](https://web.archive.org/{new_post.url})\n* [archive.ph](https://archive.ph/?url={quote(new_post.url)}&run=1) (click to archive)\n\n" gevent.spawn(archiveorg, new_post.url) # archive other urls in post - url_regex = '([^\"]+)' + url_regex = '([^\"]+)' _body = new_post.body_html print(_body) for url_match in re.finditer(url_regex, _body, flags=re.M|re.I): - href = url_match.group(1) + href = url_match.group(3) if not href: print(f'{url_match.group(0)} skip') continue print(href) - title = url_match.group(2) + title = url_match.group(5) body += f'**[{title}]({href})**:\n\n' body += f'* [reveddit.com](https://reveddit.com/{href})\n' body += f'* [archive.org](https://web.archive.org/{href})\n'