1
- package ua_test
1
+ package useragent_test
2
2
3
3
import (
4
4
"fmt"
@@ -47,6 +47,8 @@ var testTable = [][]string{
47
47
{"Mozilla/5.0 (Linux; Android 6.0.1; SAMSUNG SM-A310F/A310FXXU2BQB1 Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/5.4 Chrome/51.0.2704.106 Mobile Safari/537.36" , "Samsung Browser" , "5.4" , "mobile" , "Android" },
48
48
{"Mozilla/5.0 (Linux; Android 9; LM-Q630) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Mobile Safari/537.36" , ua .Chrome , "86.0.4240.198" , "mobile" , "Android" },
49
49
50
+ {"Mozilla/5.0 (Linux; Android 10; MED-LX9N; HMSCore 6.6.0.311) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.105 HuaweiBrowser/12.1.0.303 Mobile Safari/537.36" , "Huawei Browser" , "12.1.0.303" , "mobile" , "Android" },
51
+
50
52
// useragent, name, version, mobile, os
51
53
{"Mozilla/5.0 (Linux; Android 9; ONEPLUS A6003) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.99 Mobile Safari/537.36" , ua .Chrome , "71.0.3578.99" , "mobile" , ua .Android },
52
54
{"Mozilla/5.0 (Android 9; Mobile; rv:64.0) Gecko/64.0 Firefox/64.0" , ua .Firefox , "64.0" , "mobile" , ua .Android },
@@ -71,6 +73,9 @@ var testTable = [][]string{
71
73
{"Mozilla/5.0 (compatible; SemrushBot/7~bl; +http://www.semrush.com/bot.html" , "SemrushBot" , "7~bl" , "bot" , "" },
72
74
{"Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.268" , "YandexBot" , "3.0" , "bot" , "" },
73
75
{"Mozilla/5.0 (compatible; Discordbot/2.0; +https://discordapp.com)" , "Discordbot" , "2.0" , "bot" , "" },
76
+ {"Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)" , "Bingbot" , "2.0" , "bot" , "" }, // old binbot
77
+ {"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) Chrome/100.0.0.0 Safari/537.36" , "Bingbot" , "2.0" , "bot" , "" }, // new bingbot desktop
78
+ {"Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.1.0.0 Mobile Safari/537.36 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)" , "Bingbot" , "2.0" , "bot" , ua .Android }, // new bingbot mobile
74
79
75
80
// Brave
76
81
{"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Brave Chrome/87.0.4280.101 Safari/537.36" , ua .Chrome , "87.0.4280.101" , "desktop" , ua .Linux },
0 commit comments