mirror of
https://github.com/benbusby/whoogle-search.git
synced 2026-04-26 04:35:54 +03:00
[GH-ISSUE #595] [FEATURE] Bangs without any search term should redirect to the homepage #380
Labels
No labels
Fixed (Pending PR Merge)
Stale
bug
enhancement
enhancement
good first issue
help wanted
keep-open
needs more info
pull-request
question
theme
unfortunate
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/whoogle-search#380
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lenicyl on GitHub (Dec 28, 2021).
Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/595
Currently Whoogle bangs work this way :
!yt <search term>redirects tohttps://www.youtube.com/results?search_query=<search term>which is niceHowever if you use the bang
!ytwithout really adding any search terms it again redirects tohttps://www.youtube.com/results?search_query=which is somewhat annoyingIt would be nice if it were to be changed so that if a search term isnt used, it redirects to the homepage, which in the examples used above would mean
!ytredirects tohttps://youtube.com@Albonycal commented on GitHub (Dec 28, 2021):
hmm maybe I could work on this
@benbusby
@benbusby commented on GitHub (Dec 28, 2021):
@Albonycal sure. You'd just need to modify
app/utils/bangs.py -> resolve_bang()to make sure the URL replacement value isn't empty first. So something like (pseudocode-ish):