Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows implies generic computer #539

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions regexes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
Expand Down Expand Up @@ -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'
24 changes: 13 additions & 11 deletions tests/test_device.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -80554,5 +80554,7 @@ test_cases:
brand: 'Motorola'
model: 'motorola moto g play (2021)'



- 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'