diff --git a/regexes.yaml b/regexes.yaml index 5f1119ac..7eae4c41 100644 --- a/regexes.yaml +++ b/regexes.yaml @@ -5750,6 +5750,10 @@ device_parsers: device_replacement: 'Generic Smartphone' brand_replacement: 'Generic' model_replacement: 'Smartphone' + - regex: '(XBLWP7)' + device_replacement: 'Generic Smartphone' + brand_replacement: 'Generic' + model_replacement: 'Smartphone' ########## # Spiders (this is a hack...) @@ -5804,3 +5808,13 @@ device_parsers: device_replacement: 'Mac' brand_replacement: 'Apple' model_replacement: 'Mac' + + ######### + # Generic Computer + # @note: at the end, just to not fall into the Other category + ######### + + - regex: 'Windows NT' + device_replacement: 'Generic Computer' + brand_replacement: 'Generic' + model_replacement: 'Computer' diff --git a/tests/test_device.yaml b/tests/test_device.yaml index bb43f59b..59839bb2 100644 --- a/tests/test_device.yaml +++ b/tests/test_device.yaml @@ -341,9 +341,9 @@ test_cases: model: 'N9' - user_agent_string: 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; XBLWP7; ZuneWP7)' - family: 'Other' - brand: - model: + family: 'Generic Smartphone' + brand: 'Generic' + model: 'Smartphone' - user_agent_string: 'IUC(U;iOS 5.1.1;Zh-cn;320*480;)/UCWEB7.9.0.94/41/997' family: 'Other' @@ -386,14 +386,14 @@ test_cases: model: - user_agent_string: 'Mozilla/5.0 (Windows; U; Windows NT 6.1; zh_CN) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0 baidubrowser/1.x Safari/534.7' - family: 'Other' - brand: - model: + family: 'Generic Computer' + brand: 'Generic' + model: 'Computer' - user_agent_string: 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; baidubrowser 1.x)' - family: 'Other' - brand: - model: + family: 'Generic Computer' + brand: 'Generic' + model: 'Computer' - user_agent_string: 'ICE Browser/5.05 (Java 1.4.0; Windows 2000 5.0 x86)' family: 'Other' @@ -80554,5 +80554,7 @@ test_cases: brand: 'Motorola' model: 'motorola moto g play (2021)' - - \ No newline at end of file + - user_agent_string: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36' + family: 'Generic Computer' + brand: 'Generic' + model: 'Computer'