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

Fix IndexError for bangs with multiple replacement strings #133

Closed amogusussy closed 6 months ago

amogusussy commented 6 months ago

If you add the !dg bang to a query, you get a 500 error. This is because the string associated with this bang in bangs.json has multiple {} strings in it. In the init.py file, only one arg is provided, when this string expects 2. To fix this, I've replaced all the {} strings with {q}. This makes it so that the .format function replaces all instances, not just the first one.

Extravi commented 6 months ago

idk about the 13k lines change