mirror of
https://github.com/benbusby/whoogle-search.git
synced 2026-04-26 04:35:54 +03:00
[PR #1130] [MERGED] Fix feeling lucky #1086
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#1086
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?
📋 Pull Request Information
Original PR: https://github.com/benbusby/whoogle-search/pull/1130
Author: @pantherman594
Created: 3/22/2024
Status: ✅ Merged
Merged: 4/19/2024
Merged by: @benbusby
Base:
main← Head:bug/feeling_lucky📝 Commits (3)
6f61aa0Fix feeling lucky, fall through to display results if doesn't work453b72dAllow lucky bang anywhere9de34d2Update feeling lucky test📊 Changes
3 files changed (+54 additions, -24 deletions)
View changed files
📝
app/utils/results.py(+17 -3)📝
app/utils/search.py(+29 -20)📝
test/test_routes.py(+8 -1)📄 Description
Feeling lucky (a search query with a standalone bang) was returning 404 because it was trying to redirect to the maps link. This PR runs the result cleaning first to get the results in a consistent state and apply any URL rewriting, and excludes internal links from the results. It also skips past any details sections because those links are probably not the ones a user would be looking for. Finally, I let the feeling lucky fall back to return normal search results, in case something went wrong looking for a link.
Test was updated to verify that the correct redirection link was found.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.