Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 error on "!bang" serach #4

Open
elouangrimm opened this issue Feb 15, 2025 · 14 comments · May be fixed by #14
Open

404 error on "!bang" serach #4

elouangrimm opened this issue Feb 15, 2025 · 14 comments · May be fixed by #14

Comments

@elouangrimm
Copy link

Hello,
I'm now using unduck and I wanted to search through the bang library. I have noticed that if you try a !bang search like "!bang google" it redirects to a 404 page like this one: https://unduck.link/bang?q=google

Not sure if this is normal, I think it would be great if you make your own bang library that had a full list with some "featured" ones on top, and it would be searchable with the "!bang" bang.

Thanks!

@samyakbardiya
Copy link
Contributor

Hello @elouangrimm, the quick fix is to simply use !bangs instead.

The reason why this happened is because the bang dict was taken from DuckDuckGo, and there the default resolution of /bang?q={{{s}}} would work.

Btw, this is why it's happening, from the src/bangs.ts file:

  {
    d: "",
    s: "Search all !bangs",
    t: "bang",
    u: "/bang?q={{{s}}}",
  },
  {
    d: "duckduckgo.com",
    s: "Search all !bangs",
    t: "bangs",
    u: "https://duckduckgo.com/bang?q={{{s}}}",
  },

@elouangrimm
Copy link
Author

@samyakbardiya Thanks! I was just thinking that it would be nice for @t3dotgg or someone else to make a smooth and nice full bang searcher without all the duckduckgo stuff around it. I think that a /bang url would be the best, and instead of the link to the duckduckgo page on the home screen, have a link toa homemade version that was rendered from the bangs.ts file.

@nearbycoder
Copy link

nearbycoder commented Feb 15, 2025

@samyakbardiya Thanks! I was just thinking that it would be nice for @t3dotgg or someone else to make a smooth and nice full bang searcher without all the duckduckgo stuff around it. I think that a /bang url would be the best, and instead of the link to the duckduckgo page on the home screen, have a link toa homemade version that was rendered from the bangs.ts file.

just whipped this up it reads directly from this githubs bangs.ts file https://raw.githubusercontent.com/t3dotgg/unduck/main/src/bang.ts

https://unduck-bangs.netlify.app/ source https://github.com/nearbycoder/unduck-bangs

@elouangrimm
Copy link
Author

@nearbycoder Wow! That's perfect! You should merge it!

@elouangrimm
Copy link
Author

@nearbycoder The main problem I find with it is that results are organised alphabetically, and not by actual relevance. Like for example I search for "google" and I get this:

Image

The site is great, but the searching experience may not be the best... Love the UI though... I'm not sure how you can improve the search.

@nearbycoder
Copy link

@nearbycoder The main problem I find with it is that results are organised alphabetically, and not by actual relevance. Like for example I search for "google" and I get this:

Image

The site is great, but the searching experience may not be the best... Love the UI though... I'm not sure how you can improve the search.

ya I just added categories but would need to expand a bit more on how to index the result order.

@elouangrimm
Copy link
Author

@nearbycoder well that's what I am not sure about. all I know is that when I search Google I should have !g appear first... sorry I cant be of much help...

@elouangrimm
Copy link
Author

Also you should always fetch from the original file in this repo and not whatever the other tall-lion-44.deno.dev one you made, just for up-to-dateness sake.

@nearbycoder
Copy link

Also you should always fetch from the original file in this repo and not whatever the other tall-lion-44.deno.dev one you made, just for up-to-dateness sake.

ya it is that original file but since it's a JS file I had to do some funkyness around Deno dynamic imports https://dash.deno.com/playground/tall-lion-44

@elouangrimm
Copy link
Author

oh ok you are just fetching the original file, cool!

@nearbycoder
Copy link

@nearbycoder well that's what I am not sure about. all I know is that when I search Google I should have !g appear first... sorry I cant be of much help...

added bang search support, that should help

@elouangrimm
Copy link
Author

nice... I just wish that there was some way to like just completely reorder all of the bangs in a sort of most important to least important... do you think that AI could be used at all for that? like just moving them around?

@nearbycoder
Copy link

nice... I just wish that there was some way to like just completely reorder all of the bangs in a sort of most important to least important... do you think that AI could be used at all for that? like just moving them around?

Added a popular category that just reduces down to single character bangs, which tackles most of the popular ones and then you can still search off of that.

@elouangrimm
Copy link
Author

that's cool! works good, but that reorder idea still stands 😢

@mybearworld mybearworld linked a pull request Feb 16, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants