Comments (4)
The version must be declared as a string
from device-detector.
Problem 3
The UA Mozilla/5.0 (X11; Linux x86_64; rv:21.0) Gecko/20100101 SlimerJS/0.7
result Firefox for full parsing misc/test.php
If you use the Library parser, the result is client type "library"
# Firefox
- regex: '(?<!like )Gecko(?:/(?:\d+[\.\d]+) (?!SlimerJS))'
name: 'Firefox'
version: ''
engine:
default: 'Gecko'
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 10.0; Win64; x64; Anonymisiert durch AlMiSoft Browser-Maulkorb 39663422; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; Tablet PC 2.0; Browzar)
If we use full parsing, we get the application, but if we use the Browser Parser separately, we get the browser.
from device-detector.
@sanchezzzhak coincidence or not, I wanted to talk about this a few days ago. I use Spyc::YAMLDump
to generate the tests. Depending on version it escapes it or not in double quotes, I see there's a code in misc
folder to rewrite them, so technically all version
and engine_version
should be escaped in double quotes.
Same here:
device-detector/Tests/Parser/fixtures/oss.yml
Lines 2250 to 2257 in c9952fc
What should I do with platform:
for example. Should it be platform: ""
? Same for platform: x64
or platform: "x64"
. I want to fix them in the next days.
What I see, is empty strings should have double quotes, otherwise without double quotes (except versions).
from device-detector.
wrap quotes only for numbers \d+ and float (\d.\d) (if we expect to get the correct result in tests.)
platform: x64
- it is not necessary to escape, since there are no values that start with a number
from device-detector.
Related Issues (20)
- Extra character in regex model HOT 1
- Proxy browser HOT 1
- Multiple brands with same name HOT 2
- Fake iPhones UA + clienthints
- Android TV Boxes
- Duplicate bots HOT 2
- Additional UA strings, currently not detected
- Which other useragents are supported besides $_SERVER['HTTP_USER_AGENT']? HOT 2
- Laravel : DeviceDetector->parse() throws Class \"Spyc\" not found HOT 8
- rewriteTestFixtureFiles.php issues
- Add Uptimia bot HOT 2
- Electron mobile app detection changes some browser/pim detections HOT 2
- Duplicate: 'masscan'
- Elastic synthetic-monitoring tagged as bot
- DeviceDetector has more detailed information HOT 6
- Wrong engine classification in some Mac/iOS browsers HOT 1
- Add CloudflareObservatory/1.0 to bot list HOT 1
- UCWEB detected as bot / Proxy rule? HOT 1
- Support browser engine detection for non-browser clients HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from device-detector.