Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

[fix] Force Google old UI with a new user agent #1749

Merged
merged 1 commit into from
Nov 26, 2019
Merged

[fix] Force Google old UI with a new user agent #1749

merged 1 commit into from
Nov 26, 2019

Conversation

unixfox
Copy link
Member

@unixfox unixfox commented Nov 22, 2019

Google started to serve the new UI (that Searx can't parse) on Internet Explorer (all versions) so found out that by providing a very old version of Safari as a user agent Google let me load the old UI.

Why did I choose this very specific user agent? I wanted to use a quite common agent to avoid Google blocking it so picked this one which according to whatismybrowser.com is very common:
2019-11-22_22-39
https://developers.whatismybrowser.com/useragents/explore/software_name/safari/1

Fixes #1748
Fixes #1704

@return42
Copy link
Contributor

Tested with search query "!go foofoo" before and after patched my forked branch dm-cloud.

Works! / Thanks a lot!

@virtadpt
Copy link

Just a thought for later: What about trying the Lynx/Links user agents later, for when this happens again?

@unixfox
Copy link
Member Author

unixfox commented Nov 23, 2019

@virtadpt I tried multiple user agent from this list: https://developers.whatismybrowser.com/useragents/explore/software_name/lynx/ but none of them let me load the old Google UI, so I don't think that's the good user agent for that.
Mainly because Lynx is just not that popular for Google to take into account. Whereas with Safari it's still a browser quite popular.

@dimqua
Copy link
Contributor

dimqua commented Nov 23, 2019

IIRC, Google Search works fine in Lynx/Links.

@unixfox
Copy link
Member Author

unixfox commented Nov 24, 2019

That doesn't mean it's loading the old UI, Google has developed a special version of their new UI specially for the old browsers like IE and it's working fine even better than the old UI.

Copy link
Member

@asciimoo asciimoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great fix! Thank you!

@asciimoo asciimoo merged commit 2a527b8 into searx:master Nov 26, 2019
@return42
Copy link
Contributor

return42 commented Dec 1, 2019

FYI: 2a527b8#commitcomment-36209713

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
5 participants