From 0048c2f9aafc3eda6300eb7642a525567b65228f Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Mon, 21 Mar 2022 10:08:52 -0600 Subject: [PATCH] Update remaining alternative frontends to use Farside Wikipedia, imgur, and translate alternatives were all still using hardcoded URLs when replaced with their respective alternative frontend. This updates them to use farside instead. --- Dockerfile | 6 +++--- README.md | 6 +++--- app.json | 6 +++--- app/__init__.py | 2 +- app/utils/results.py | 4 ++-- docker-compose.yml | 6 +++--- test/test_results.py | 2 +- whoogle.template.env | 6 +++--- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index 90001db..2577198 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,9 +40,9 @@ ARG youtube_alt='farside.link/invidious' ARG instagram_alt='farside.link/bibliogram' ARG reddit_alt='farside.link/libreddit' ARG medium_alt='farside.link/scribe' -ARG translate_alt='lingva.ml' -ARG imgur_alt='imgin.voidnet.tech' -ARG wikipedia_alt='wikiless.org' +ARG translate_alt='farside.link/lingva' +ARG imgur_alt='farside.link/rimgo' +ARG wikipedia_alt='farside.link/wikiless' ENV CONFIG_VOLUME=$config_dir \ WHOOGLE_USER=$username \ diff --git a/README.md b/README.md index 9f71266..f95e594 100644 --- a/README.md +++ b/README.md @@ -202,9 +202,9 @@ Description=Whoogle #Environment=WHOOGLE_ALT_IG=farside.link/bibliogram/u #Environment=WHOOGLE_ALT_RD=farside.link/libreddit #Environment=WHOOGLE_ALT_MD=farside.link/scribe -#Environment=WHOOGLE_ALT_TL=lingva.ml -#Environment=WHOOGLE_ALT_IMG=imgin.voidnet.tech -#Environment=WHOOGLE_ALT_WIKI=wikiless.org +#Environment=WHOOGLE_ALT_TL=farside.link/lingva +#Environment=WHOOGLE_ALT_IMG=farside.link/rimgo +#Environment=WHOOGLE_ALT_WIKI=farside.link/wikiless # Load values from dotenv only #Environment=WHOOGLE_DOTENV=1 Type=simple diff --git a/app.json b/app.json index a3b391e..b6e537e 100644 --- a/app.json +++ b/app.json @@ -72,17 +72,17 @@ }, "WHOOGLE_ALT_TL": { "description": "The Google Translate alternative to use for all searches following the 'translate ___' structure.", - "value": "lingva.ml", + "value": "farside.link/lingva", "required": false }, "WHOOGLE_ALT_IMG": { "description": "The site to use as a replacement for imgur.com when site alternatives are enabled in the config.", - "value": "imgin.voidnet.tech", + "value": "farside.link/rimgo", "required": false }, "WHOOGLE_ALT_WIKI": { "description": "The site to use as a replacement for wikipedia.com when site alternatives are enabled in the config.", - "value": "wikiless.org", + "value": "farside.link/wikiless", "required": false }, "WHOOGLE_MINIMAL": { diff --git a/app/__init__.py b/app/__init__.py index 83f8847..89a4948 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -82,7 +82,7 @@ app.config['HAS_UPDATE'] = '' # The alternative to Google Translate is treated a bit differently than other # social media site alternatives, in that it is used for any translation # related searches. -translate_url = os.getenv('WHOOGLE_ALT_TL', 'https://lingva.ml') +translate_url = os.getenv('WHOOGLE_ALT_TL', 'https://farside.link/lingva') if not translate_url.startswith('http'): translate_url = 'https://' + translate_url app.config['TRANSLATE_URL'] = translate_url diff --git a/app/utils/results.py b/app/utils/results.py index 3e8f849..a7ce6f1 100644 --- a/app/utils/results.py +++ b/app/utils/results.py @@ -34,8 +34,8 @@ SITE_ALTS = { 'medium.com', 'levelup.gitconnected.com' ], os.getenv('WHOOGLE_ALT_MD', 'farside.link/scribe')), - 'imgur.com': os.getenv('WHOOGLE_ALT_IMG', 'imgin.voidnet.tech'), - 'wikipedia.org': os.getenv('WHOOGLE_ALT_WIKI', 'wikiless.org') + 'imgur.com': os.getenv('WHOOGLE_ALT_IMG', 'farside.link/rimgo'), + 'wikipedia.org': os.getenv('WHOOGLE_ALT_WIKI', 'farside.link/wikiless') } diff --git a/docker-compose.yml b/docker-compose.yml index 676a03c..bef40d4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -37,9 +37,9 @@ services: #- WHOOGLE_ALT_IG=farside.link/bibliogram/u #- WHOOGLE_ALT_RD=farside.link/libreddit #- WHOOGLE_ALT_MD=farside.link/scribe - #- WHOOGLE_ALT_TL=lingva.ml - #- WHOOGLE_ALT_IMG=imgin.voidnet.tech - #- WHOOGLE_ALT_WIKI=wikiless.org + #- WHOOGLE_ALT_TL=farside.link/lingva + #- WHOOGLE_ALT_IMG=farside.link/rimgo + #- WHOOGLE_ALT_WIKI=farside.link/wikiless #env_file: # Alternatively, load variables from whoogle.env #- whoogle.env ports: diff --git a/test/test_results.py b/test/test_results.py index bd3ac00..8b16b0f 100644 --- a/test/test_results.py +++ b/test/test_results.py @@ -60,7 +60,7 @@ def test_translate_search(client): # Pretty weak test, but better than nothing str_data = str(rv.data) assert 'iframe' in str_data - assert 'lingva.ml/auto/en/ hola' in str_data + assert '/auto/en/ hola' in str_data def test_block_results(client): diff --git a/whoogle.template.env b/whoogle.template.env index 70e1c40..44f84ef 100644 --- a/whoogle.template.env +++ b/whoogle.template.env @@ -12,9 +12,9 @@ #WHOOGLE_ALT_IG=farside.link/bibliogram/u #WHOOGLE_ALT_RD=farside.link/libreddit #WHOOGLE_ALT_MD=farside.link/scribe -#WHOOGLE_ALT_TL=lingva.ml -#WHOOGLE_ALT_IMG=imgin.voidnet.tech -#WHOOGLE_ALT_WIKI=wikiless.org +#WHOOGLE_ALT_TL=farside.link/lingva +#WHOOGLE_ALT_IMG=farside.link/rimgo +#WHOOGLE_ALT_WIKI=farside.link/wikiless #WHOOGLE_USER="" #WHOOGLE_PASS="" #WHOOGLE_PROXY_USER=""