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

Improving QQ Browser detection #1936

Merged
merged 1 commit into from
Aug 24, 2018
Merged

Conversation

jaydiablo
Copy link
Contributor

Fixes #1935

In addition to adding patterns for the UAs I saw being detected as Chrome, I also took the time to greatly improve the QQ Browser detection using historical UAs we've collected over the years that contained the QQ Browser identifiers (QQ/, MQQBrowser/, QQBrowser/) for all platforms.

I've also split some of the files by version based on the patterns found in these UAs (in what versions were certain platforms or UA patterns "retired"). To help reduce the total number of patterns being added.

I've made tests out of all UAs possible to cover as many patterns as possible.

Over 7,500 UAs are now properly detected as QQ Browser with the expected platform/browser versions (many were being detected as IE/Netscape/Chrome/Safari).

I've also compared this branch to master on some recent collections of UAs and confirmed that the differences are all expected (correctly identifying QQ Browser and platform/browser versions).

@codecov
Copy link

codecov bot commented Aug 24, 2018

Codecov Report

Merging #1936 into master will decrease coverage by 0.15%.
The diff coverage is 38.44%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1936      +/-   ##
============================================
- Coverage     51.23%   51.08%   -0.16%     
  Complexity      905      905              
============================================
  Files          1677     1685       +8     
  Lines         60039    60505     +466     
  Branches      26245    26494     +249     
============================================
+ Hits          30760    30907     +147     
- Misses        29279    29598     +319
Flag Coverage Δ Complexity Δ
#full 46% <34.65%> (-0.14%) 0 <0> (ø)
#lite 2.12% <0%> (-0.02%) 0 <0> (ø)
#standard 26.87% <26.53%> (-0.04%) 0 <0> (ø)
Impacted Files Coverage Δ Complexity Δ
...rs/mqq-browser/mqq-browser-android-5-4-to-5-8.json 0% <0%> (ø) 0 <0> (?)
...ents/browsers/mqq-browser/mqq-browser-generic.json 3.75% <0%> (-2.36%) 0 <0> (ø)
...owsers/mqq-browser/mqq-browser-android-8-0-on.json 0% <0%> (ø) 0 <0> (?)
...nts/browsers/mqq-browser/mqq-browser-mac-2-on.json 100% <100%> (ø) 0 <0> (ø) ⬇️
...ents/browsers/mqq-browser/mqq-browser-mac-1-x.json 100% <100%> (ø) 0 <0> (ø) ⬇️
...ers/mqq-browser/mqq-browser-hd-ios-2-8-to-3.4.json 63.63% <100%> (ø) 0 <0> (?)
...r-agents/browsers/mqq-browser/mqq-browser-ios.json 96.87% <100%> (+14.11%) 0 <0> (ø) ⬇️
...rs/mqq-browser/mqq-browser-android-4-0-to-5-3.json 37.73% <37.73%> (ø) 0 <0> (?)
...rs/mqq-browser/mqq-browser-android-2-7-to-3-7.json 43.58% <43.58%> (ø) 0 <0> (?)
...rs/mqq-browser/mqq-browser-android-7-1-to-7-9.json 65% <65%> (ø) 0 <0> (?)
... and 16 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 39dbe78...2106972. Read the comment docs.

@mimmi20 mimmi20 self-assigned this Aug 24, 2018
@mimmi20 mimmi20 added this to the 6.0.31 milestone Aug 24, 2018
@mimmi20 mimmi20 merged commit 1dbaf67 into browscap:master Aug 24, 2018
@jaydiablo jaydiablo deleted the issue-1935 branch August 25, 2018 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants