WhichBrowser / Parser-PHP

Browser sniffing gone too far — A useragent parser library for PHP
http://whichbrowser.net
MIT License
1.79k stars 240 forks source link

Incorrect brand name result it's `SmarDTV` and not `SmarD TV` #625

Closed summercms closed 2 years ago

summercms commented 3 years ago

The test result is incorrect.

https://github.com/WhichBrowser/Parser-PHP/blob/da24adc4f4f26002673d236e69b91a10f2fd594c/tests/data/television/other.yaml#L74-L77

The brand name is: SmarDTV not SmarD TV (note the space between the D and TV), see Google result:

image

Location in repo

Can't find an exact location, seems to be maybe a fallback method or something?

I was looking at this file:

https://github.com/WhichBrowser/Parser-PHP/blob/master/src/Analyser/Header/Useragent/Device/Television.php

Set top Box (not TV)

This company seems to make set top boxes and not tv's, see promo videos:

https://www.youtube.com/watch?v=Hec1mecXVbg

https://www.youtube.com/watch?v=2PYC_4qn56w

Not sure if want to create a new category for Set top boxes as TV doesn't seem to be a good fit for some results.

Help please

Going to leave this open issue for the admins, I would love to add a pr for this, but not sure where the exact code location is to edit?

Sainan commented 3 years ago

I suspect the name is taken verbatim from the headers:

User-Agent: HbbTV/1.2.1 (+DL; SmarD TV; TCL; 1.32.455; 2.002; WOTV/0.1; SmartTvA/3.0.0.0;)