Open metalwolf opened 3 years ago
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
The google search console bot for mobile is detected as computer wich makes google believe the mobile sites are for PC.
Output:
Could be good to detect google bots as computer or mobile as it should be
Going to fork to modify this