mirror of
https://github.com/benbusby/whoogle-search.git
synced 2026-04-25 12:15:50 +03:00
[PR #1052] [MERGED] Fix: keep blank values as True to handle blank 'q' input. #1063
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#1063
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/1052
Author: @ahmad-alkadri
Created: 8/13/2023
Status: ✅ Merged
Merged: 8/21/2023
Merged by: @benbusby
Base:
main← Head:fix/1050-handle-filter-blank-query📝 Commits (1)
504ff35Fix: keep blank values = True to handle blank 'q' input.📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
app/filter.py(+1 -1)📄 Description
This PR fixes (potentially) Issue #1050.
Location of the bug found at the function:
What happened when searching the query “Mathias Normann” (and potentially could be other queries) is that the
hrefcontains"q"but the value is blank in bothhrefandq_stras follows:Thus, the value of ‘q’ would be blank.
By default, the function
parse_qswill not keep the blank values nor keys, thus making the resultingparse_qs(q_str)['q'][0]throwing aKeyErrorbecause the key ‘q’ is simply not there.To fix this, I simply put the
keep_blank_valuesparameter of theparse_qsfunction intoTrue. This fixes the problem.Some screenshots:
Open to discussions and modifications if needed.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.