araa-search icon indicating copy to clipboard operation
araa-search copied to clipboard

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

Open dieser-niko opened this issue 1 year ago • 14 comments

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.

dieser-niko avatar Mar 07 '24 08:03 dieser-niko

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 avatar Mar 07 '24 09:03 Extravi

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. 

Extravi avatar Mar 07 '24 09:03 Extravi

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.

amogusussy avatar Mar 09 '24 19:03 amogusussy

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

thelastblt avatar Jul 24 '24 21:07 thelastblt

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 avatar Jul 25 '24 03:07 Extravi

image

Extravi avatar Jul 25 '24 04:07 Extravi

image

Extravi avatar Jul 25 '24 04:07 Extravi

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

Extravi avatar Jul 25 '24 04:07 Extravi

let me know how that looks, thanks

Extravi avatar Jul 25 '24 04:07 Extravi

image image image image

Extravi avatar Jul 25 '24 04:07 Extravi

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?

amogusussy avatar Jul 25 '24 18:07 amogusussy

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 avatar Aug 31 '24 22:08 Extravi

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 avatar Aug 31 '24 22:08 Extravi

the most secure way might be doing it locally with javascript

Extravi avatar Aug 31 '24 23:08 Extravi