Extravi / araa-search

A privacy-respecting, ad-free, self-hosted Google metasearch engine with strong security that offers full API support and utilizes Qwant for images, and DuckDuckGo for auto-complete.
https://araa.extravi.dev
GNU Affero General Public License v3.0
241 stars 22 forks source link

[Feature Request] Redirect to alternatives (ex. Invidious instead of YouTube) #129

Open dieser-niko opened 7 months ago

dieser-niko commented 7 months ago

Hi there,

I host a few other search instances like LibreY, Whoogle, 4get and of course yours.

One feature in Whoogle that I really like is replacing links to YouTube, Reddit, etc. with some other sites like Invidious, RedLib (a fork of Libreddit), etc. Whoogle does this with a set of predefined Environment Variables

I've tested all these search front ends and have to say that yours looks and feels the best, but the redirection to Invidious and RedLib is something I really miss.

Extravi commented 7 months ago

This is something I've been wanting to do. I'm just looking into my implementation first, and parts of settings as of right now require JavaScript, so this might require JavaScript on the client. But all the JavaScript is framework-free and open source under the GPL and works with LibreJS, and like LibreY, this will be configurable on the client; I'm just looking for a relatively clean solution.

Extravi commented 7 months ago

This is something that will be added, and once it's added, I'll let you know. Please keep this issue open until then and provide feedback once it's added to Araa. 

amogusussy commented 6 months ago

You could have it as a textarea box where the user types in the original url, and the url to redirect to. This can be in a separate page in the settings, like the 'Discover Themes' is. For example, to redirect from https://youtube.com/ to https://yewtu.be/, the user would enter:

https://youtube.com/=https://yewtu.be/

This can be set as a cookie, then an extra function will parse the cookie, and return a dict of all the sites. Then, have another function that checks if a url has one of these sites in their url, then replace it with whatever the user has said to replace it with.

There should also be a default set in config.py by the admin of the instance.

thelastblt commented 2 months ago

i was able to have it redirect to my invidious instance by setting this .env variable -PIPED_INSTANCE=

Extravi commented 2 months ago

this is being worked on right now it will be it's own end point with a button to it from settings at /redirects

Extravi commented 2 months ago

image

Extravi commented 2 months ago

image

Extravi commented 2 months ago

it will look something like this trying to keep it constant with everything else and all the UI

Extravi commented 2 months ago

let me know how that looks, thanks

Extravi commented 2 months ago

image image image image

amogusussy commented 2 months ago

The UI looks good. It could be better if there's a way to add your own redirects of sites that you choose, rather than being restricted to whatever is listed.

Can you make a separate branch so I can do some testing?

Extravi commented 1 month ago

The UI looks good. It could be better if there's a way to add your own redirects of sites that you choose, rather than being restricted to whatever is listed.

Can you make a separate branch so I can do some testing?

i like this idea but i have not worked in araa in sometime

Extravi commented 1 month ago

The UI looks good. It could be better if there's a way to add your own redirects of sites that you choose, rather than being restricted to whatever is listed.

Can you make a separate branch so I can do some testing?

im not sure how this could affect security the entire idea of redirects in general

Extravi commented 1 month ago

the most secure way might be doing it locally with javascript