-
Notifications
You must be signed in to change notification settings - Fork 77
Open
Description
The google search console bot for mobile is detected as computer wich makes google believe the mobile sites are for PC.
func main() {
useragent := "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.92 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
ua := uasurfer.Parse(useragent)
fmt.Printf("Useragent: %s\n Result: %+v\n", useragent, ua)
}
Output:
Useragent: Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.92 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
Result: &{Browser:{Name:BrowserGoogleBot Version:{Major:0 Minor:0 Patch:0}} OS:{Platform:PlatformBot Name:OSBot Version:{Major:6 Minor:0 Patch:1}} DeviceType:DeviceComputer}
Could be good to detect google bots as computer or mobile as it should be
Going to fork to modify this
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels