forked from rDrama/rDrama
use nitter.net again
parent
4993c3a889
commit
0ac19b8af0
|
@ -23,7 +23,7 @@ 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 = twitter_to_nitter_regex.sub(r'\1https://nitter.lacontrevoie.fr/', body)
|
||||
body = twitter_to_nitter_regex.sub(r'\1https://nitter.net/', body)
|
||||
if v.imginn:
|
||||
body = body.replace('https://instagram.com/', 'https://imginn.com/')
|
||||
return body
|
||||
|
|
|
@ -39,7 +39,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.lacontrevoie.fr/')
|
||||
url = url.replace('https://twitter.com/', 'https://nitter.net/')
|
||||
gevent.spawn(_archiveorg, url)
|
||||
if url.startswith('https://instagram.com/'):
|
||||
url = url.replace('https://instagram.com/', 'https://imginn.com/')
|
||||
|
|
|
@ -755,7 +755,7 @@ def normalize_url(url):
|
|||
.replace("https://www.twitter.com", "https://twitter.com") \
|
||||
.replace("https://nitter.net/", "https://twitter.com/") \
|
||||
.replace("https://nitter.42l.fr/", "https://twitter.com/") \
|
||||
.replace("https://nitter.lacontrevoie.fr/", "https://twitter.com/") \
|
||||
.replace("https://nitter.net/", "https://twitter.com/") \
|
||||
.replace("https://m.facebook.com", "https://facebook.com") \
|
||||
.replace("https://m.wikipedia.org", "https://wikipedia.org") \
|
||||
.replace("https://www.instagram.com", "https://instagram.com") \
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
<section id="site-settings-external-services-section" class="settings-section-section">
|
||||
<h5>External Services</h5>
|
||||
<div class="settings-section rounded">
|
||||
{{common.toggle_section("Use Nitter for Twitter Links", "nitter", "nitter", v.nitter, "Enable if you would like to automatically convert twitter.com links to nitter.lacontrevoie.fr links.", false)}}
|
||||
{{common.toggle_section("Use Nitter for Twitter Links", "nitter", "nitter", v.nitter, "Enable if you would like to automatically convert twitter.com links to nitter.net links.", false)}}
|
||||
{{common.toggle_section("Use Imginn for Instagram Links", "imginn", "imginn", v.imginn, "Enable if you would like to automatically convert instagram.com links to imginn.com links.", false)}}
|
||||
<div class="d-lg-flex border-bottom">
|
||||
<div class="title w-lg-25">
|
||||
|
|
Loading…
Reference in New Issue