python-user-agents icon indicating copy to clipboard operation
python-user-agents copied to clipboard

VZW edition of Galaxy S4 comes up as tablet.

Open jameyc opened this issue 10 years ago • 1 comments

The Verizon edition S4 (SCH-I545) has the user agent string "Mozilla/5.0 (Linux; Android 4.4.2; en-us; SAMSUNG SCH-I545 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/1.5 Chrome/28.0.1500.94 Mobile Safari/537.36"

which erroniously comes back as true in parsers.py's _is_android_tablet() line 116 due to the "SCH-" prefix.

Glancing through the other recent Samsung phones, I don't see any others using the prefix - this seems to be an odd (but widespread) case.

jameyc avatar Aug 15 '14 19:08 jameyc

I wonder if we should just hardcode the three tablet model numbers found on tera-wurfl.com: http://www.tera-wurfl.com/explore/search.php?search=samsung+sch&mode=all&action=search&submit=Search+Devices .

Alternatively, we could also drop the check altogether as future tablet devices shouldn't have "Mobile" in their user agent string.

selwin avatar Aug 17 '14 03:08 selwin