Align search URLs with upstream sites#15
Open
hqhq1025 wants to merge 1 commit into
Open
Conversation
3cc9d1d to
6ffc69d
Compare
6ffc69d to
0dc28ee
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes known search URL shapes realistic while keeping old
/search?q=...routes as compatibility aliases.Canonical search URLs added/emitted:
/s?k=<query>with/search?q=<query>kept as legacy alias./searchresults.html?ss=<query>with/search?q=<query>kept as legacy alias./maps/search/<query>with/search?q=<query>kept as legacy alias./search/_/q/<query>with/search?q=<query>kept as legacy alias./search/<query>with/search?q=<query>kept as legacy alias./search?query=<query>with/search?q=<query>kept as legacy alias./search/full-text?q=<query>with/search?q=<query>kept as legacy alias./search/direct/?datasetsearch=english&q=<query>with/search?q=<query>kept as legacy alias./search/english-thesaurus/direct/?datasetsearch=english-thesaurus&q=<query>with/thesaurus?q=<query>kept as legacy alias.Audited and documented as already close to upstream shape or intentionally different:
/search?q=<query>plus vertical params such astbm=..../search?q=<query>&type=..../search?q=<query>./search/?query=<query>&searchtype=..../input?i=<query>for computation and/search?q=...for topic search./flights?...; generic/search?q=...is a local airport/city/airline helper.For path-based search URLs, small submit handlers rewrite the destination before navigation so the browser location becomes the upstream-shaped URL. Existing no-JS/query-string aliases still resolve through the same search view.
Also adds:
docs/search-url-realism.mdscripts/check_search_url_realism.pyVerification
python3 scripts/check_search_url_realism.pypython3 -m py_compile sites/amazon/app.py sites/booking/app.py sites/google_map/app.py sites/espn/app.py sites/apple/app.py sites/coursera/app.py sites/huggingface/app.py sites/cambridge_dictionary/app.py scripts/check_search_url_realism.py/s?k=xboxand/search?q=xbox/searchresults.html?ss=Parisand/search?q=Paris/maps/search/central%20parkand/search?q=central%20park/search/_/q/lakersand/search?q=lakers/search/iphoneand/search?q=iphone/search?query=pythonand/search?q=python/search/direct/?datasetsearch=english&q=helloand/search?q=hellopy_compile; full render smoke requires HF-managed image assets that are not present in this isolated worktree.Fixes #14.