forked from MarseyWorld/MarseyWorld
nitter shit
parent
8061723a98
commit
11f4ef060c
|
@ -23,8 +23,8 @@ def normalize_urls_runtime(body, v):
|
|||
if v.reddit != 'old.reddit.com':
|
||||
body = reddit_to_vreddit_regex.sub(rf'\1https://{v.reddit}/\2/', body)
|
||||
if v.nitter:
|
||||
body = body.replace('https://twitter.com/', 'https://nitter.42l.fr/')
|
||||
body = body.replace('https://nitter.42l.fr/i/', 'https://twitter.com/i/')
|
||||
body = body.replace('https://twitter.com/', 'https://nitter.lacontrevoie.fr/')
|
||||
body = body.replace('https://nitter.lacontrevoie.fr/i/', 'https://twitter.com/i/')
|
||||
if v.imginn:
|
||||
body = body.replace('https://instagram.com/', 'https://imginn.com/')
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ def archiveorg(url):
|
|||
def archive_url(url):
|
||||
gevent.spawn(archiveorg, url)
|
||||
if url.startswith('https://twitter.com/'):
|
||||
url = url.replace('https://twitter.com/', 'https://nitter.42l.fr/')
|
||||
url = url.replace('https://twitter.com/', 'https://nitter.lacontrevoie.fr/')
|
||||
gevent.spawn(archiveorg, url)
|
||||
if url.startswith('https://instagram.com/'):
|
||||
url = url.replace('https://instagram.com/', 'https://imginn.com/')
|
||||
|
|
|
@ -443,7 +443,10 @@ def normalize_url(url):
|
|||
.replace("https://streamable.com/", "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.42l.fr/", "https://twitter.com/") \
|
||||
.replace("https://nitter.lacontrevoie.fr/", "https://twitter.com/")
|
||||
|
||||
url = imgur_regex.sub(r'\1_d.webp?maxwidth=9999&fidelity=high', url)
|
||||
url = giphy_regex.sub(r'\1.webp', url)
|
||||
|
|
|
@ -185,7 +185,7 @@
|
|||
<label class="custom-control-label" for="nitter"></label>
|
||||
</div>
|
||||
|
||||
<span class="text-small text-muted">Enable if you would like to automatically convert twitter.com links to nitter.42l.fr links.</span>
|
||||
<span class="text-small text-muted">Enable if you would like to automatically convert twitter.com links to nitter.lacontrevoie.fr links.</span>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue