Interesting. I use the nadeko instance when my personal Invidious instance goes down...How to Redirect DuckDuckGo !iv Searches to Invidious using Redirector Extension
1. Open Redirector Extension Settings
Go to your browser’s extensions page, locate and open Redirector, and click “Add new redirect” or “Create new rule”.
2. Fill in the Rule Template
- Example URL:
Code:https://duckduckgo.com/?q=https://www.youtube.com/watch?v=IrzhdyGy8tU!iv
- Include Pattern (Regular Expression):
Code:(?:https?://)(?:.*\.)?duckduckgo\.com/(?:\?(?:[^&]*&)*q=|(?:\?|&)q=)(?:.*?(?:youtube\.com/watch\?v=|youtu\.be/))([a-zA-Z0-9_-]{11})(?:.*?)(?:(?:%21|!)iv)(?:\W|$)
- Redirect To:
Code:https://inv.nadeko.net/watch?v=$1
- Pattern Type: Regular Expression
3. Explanation of Each Field
- Include Pattern:
This regex matches DuckDuckGo search URLs where theq
parameter contains a YouTube link with a video ID, followed by!iv
.
It captures the video ID as$1
.- Redirect To:
Inserts the captured YouTube ID into the Invidious template:
https://inv.nadeko.net/watch?v=$1
This converts any matched DuckDuckGo search to an Invidious video page.- Pattern Type:
Choose Regular Expression to allow for regex capture groups.
4. Example in Redirector UI
Code:Name: DuckDuckGo !iv to Invidious Example URL: https://duckduckgo.com/?q=https://www.youtube.com/watch?v=IrzhdyGy8tU!iv Include Pattern: (?:https?://)(?:.*\.)?duckduckgo\.com/(?:\?(?:[^&]*&)*q=|(?:\?|&)q=)(?:.*?(?:youtube\.com/watch\?v=|youtu\.be/))([a-zA-Z0-9_-]{11})(?:.*?)(?:(?:%21|!)iv)(?:\W|$) Redirect to: https://inv.nadeko.net/watch?v=$1 Pattern type: Regular Expression
5. Save and Test
- Click Save.
- Try searching on DuckDuckGo for:
Code:https://www.youtube.com/watch?v=IrzhdyGy8tU!iv
- When you visit the search result URL, it will immediately redirect to:
Code:https://inv.nadeko.net/watch?v=IrzhdyGy8tU
Notes
- This rule is specific: It only triggers when the URL pattern is matched (YouTube in the
q
param and!iv
present).- For additional YouTube formats (like
youtu.be
shortlinks), you may want to further enhance the pattern. The given pattern covers both full and short YouTube video URLs.
Result:
You can now use any DuckDuckGo search with a YouTube URL and the!iv
bang to land on the equivalent Invidious video automatically!
Is there a benefit to searching DDG and redirecting to nadeko vs just using `insertQueryHere - Invidious` and/or adding nadeko as a search engine in your browser?