only allow imginn replacement for posts, since other types of content arent supported by it
parent
90752abd2c
commit
0c5c97a1f8
|
@ -25,7 +25,7 @@ def normalize_urls_runtime(body, v):
|
|||
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/')
|
||||
body = body.replace('https://instagram.com/p/', 'https://imginn.com/p/')
|
||||
return body
|
||||
|
||||
class Comment(Base):
|
||||
|
|
|
@ -40,7 +40,7 @@ def archive_url(url):
|
|||
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/')
|
||||
url = url.replace('https://instagram.com/p/', 'https://imginn.com/p/')
|
||||
gevent.spawn(_archiveorg, url)
|
||||
|
||||
def execute_snappy(post:Submission, v:User):
|
||||
|
|
Loading…
Reference in New Issue