forked from MarseyWorld/MarseyWorld
remove unddit.com (RIP u will not be forgotten)
parent
0d6cc6745c
commit
7f6675f7f9
|
@ -148,15 +148,7 @@ def execute_snappy(post:Post, v:User):
|
||||||
body += "\n\n"
|
body += "\n\n"
|
||||||
|
|
||||||
if post.url and not post.url.startswith('/') and not post.url.startswith(f'{SITE_FULL}/') and not post.url.startswith(SITE_FULL_IMAGES):
|
if post.url and not post.url.startswith('/') and not post.url.startswith(f'{SITE_FULL}/') and not post.url.startswith(SITE_FULL_IMAGES):
|
||||||
if post.url.startswith('https://old.reddit.com/r/'):
|
body += f"Snapshots:\n\n* [archive.org](https://web.archive.org/{post.url})\n\n* [ghostarchive.org](https://ghostarchive.org/search?term={quote(post.url)})\n\n* [archive.ph](https://archive.ph/?url={quote(post.url)}&run=1) (click to archive)\n\n"
|
||||||
rev = post.url.replace('https://old.reddit.com/', '')
|
|
||||||
rev = f"* [unddit.com](https://unddit.com/{rev})\n\n"
|
|
||||||
elif post.url.startswith("https://old.reddit.com/u/"):
|
|
||||||
rev = post.url.replace('https://old.reddit.com/u/', '')
|
|
||||||
rev = "* [camas.unddit.com](https://camas.unddit.com/reddit-search/#\u007b\"author\":\"{rev}\",\"resultSize\":100\u007d)\n\n"
|
|
||||||
else: rev = ''
|
|
||||||
|
|
||||||
body += f"Snapshots:\n\n{rev}* [archive.org](https://web.archive.org/{post.url})\n\n* [ghostarchive.org](https://ghostarchive.org/search?term={quote(post.url)})\n\n* [archive.ph](https://archive.ph/?url={quote(post.url)}&run=1) (click to archive)\n\n"
|
|
||||||
archive_url(post.url)
|
archive_url(post.url)
|
||||||
|
|
||||||
captured = []
|
captured = []
|
||||||
|
@ -180,12 +172,6 @@ def execute_snappy(post:Post, v:User):
|
||||||
if "Snapshots:\n\n" not in body: body += "Snapshots:\n\n"
|
if "Snapshots:\n\n" not in body: body += "Snapshots:\n\n"
|
||||||
if f'**[{title}]({href})**:\n\n' not in body:
|
if f'**[{title}]({href})**:\n\n' not in body:
|
||||||
addition = f'**[{title}]({href})**:\n\n'
|
addition = f'**[{title}]({href})**:\n\n'
|
||||||
if href.startswith('https://old.reddit.com/r/'):
|
|
||||||
rev = href.replace('https://old.reddit.com/', '')
|
|
||||||
addition += f'* [unddit.com](https://unddit.com/{rev})\n\n'
|
|
||||||
if href.startswith('https://old.reddit.com/u/'):
|
|
||||||
rev = href.replace('https://old.reddit.com/u/', '')
|
|
||||||
addition += "* [camas.unddit.com](https://camas.unddit.com/reddit-search/#\u007b\"author\":\"{rev}\",\"resultSize\":100\u007d)\n\n"
|
|
||||||
addition += f'* [archive.org](https://web.archive.org/{href})\n\n'
|
addition += f'* [archive.org](https://web.archive.org/{href})\n\n'
|
||||||
addition += f'* [ghostarchive.org](https://ghostarchive.org/search?term={quote(href)})\n\n'
|
addition += f'* [ghostarchive.org](https://ghostarchive.org/search?term={quote(href)})\n\n'
|
||||||
addition += f'* [archive.ph](https://archive.ph/?url={quote(href)}&run=1) (click to archive)\n\n'
|
addition += f'* [archive.ph](https://archive.ph/?url={quote(href)}&run=1) (click to archive)\n\n'
|
||||||
|
|
|
@ -658,7 +658,6 @@ def normalize_url(url):
|
||||||
.replace("https://www.streamable.com", "https://streamable.com") \
|
.replace("https://www.streamable.com", "https://streamable.com") \
|
||||||
.replace("https://streamable.com/", "https://streamable.com/e/") \
|
.replace("https://streamable.com/", "https://streamable.com/e/") \
|
||||||
.replace("https://streamable.com/e/e/", "https://streamable.com/e/") \
|
.replace("https://streamable.com/e/e/", "https://streamable.com/e/") \
|
||||||
.replace("https://search.marsey.cat/#", "https://camas.unddit.com/#") \
|
|
||||||
.replace("https://imgur.com/", "https://i.imgur.com/") \
|
.replace("https://imgur.com/", "https://i.imgur.com/") \
|
||||||
.replace("https://nitter.net/", "https://twitter.com/") \
|
.replace("https://nitter.net/", "https://twitter.com/") \
|
||||||
.replace("https://nitter.42l.fr/", "https://twitter.com/") \
|
.replace("https://nitter.42l.fr/", "https://twitter.com/") \
|
||||||
|
|
|
@ -164,7 +164,7 @@ def settings_personal_post(v):
|
||||||
updated = True
|
updated = True
|
||||||
elif request.values.get("reddit", v.reddit) != v.reddit:
|
elif request.values.get("reddit", v.reddit) != v.reddit:
|
||||||
reddit = request.values.get("reddit")
|
reddit = request.values.get("reddit")
|
||||||
if reddit in {'old.reddit.com', 'reddit.com', 'i.reddit.com', 'reddit.lol', 'libredd.it', 'unddit.com'}:
|
if reddit in {'old.reddit.com', 'reddit.com', 'i.reddit.com', 'reddit.lol', 'libredd.it'}:
|
||||||
updated = True
|
updated = True
|
||||||
v.reddit = reddit
|
v.reddit = reddit
|
||||||
elif request.values.get("poor", v.poor) != v.poor:
|
elif request.values.get("poor", v.poor) != v.poor:
|
||||||
|
|
|
@ -115,7 +115,7 @@
|
||||||
<p>Change the domain you would like to view reddit posts in.</p>
|
<p>Change the domain you would like to view reddit posts in.</p>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<select autocomplete="off" id='reddit' class="form-control setting_select" data-nonce="{{g.nonce}}" form="profile-settings" name="reddit">
|
<select autocomplete="off" id='reddit' class="form-control setting_select" data-nonce="{{g.nonce}}" form="profile-settings" name="reddit">
|
||||||
{% for entry in ['old.reddit.com', 'reddit.com', 'i.reddit.com', 'unddit.com', 'reddit.lol', 'libredd.it'] %}
|
{% for entry in ['old.reddit.com', 'reddit.com', 'i.reddit.com', 'reddit.lol', 'libredd.it'] %}
|
||||||
<option value="{{entry}}"{{' selected' if v.reddit==entry}}>{{entry}}</option>
|
<option value="{{entry}}"{{' selected' if v.reddit==entry}}>{{entry}}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
|
|
Loading…
Reference in New Issue