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

Unable to detect Bot - #284

Closed
hbohra opened this issue Dec 14, 2017 · 2 comments
Closed

Unable to detect Bot - #284

hbohra opened this issue Dec 14, 2017 · 2 comments

Comments

@hbohra
Copy link

hbohra commented Dec 14, 2017

Hey- this library is unable to detect a bot. For the below useragent string:

  • Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko GomezAgent 3.0) Chrome/46.0.2490.71 Safari/537.36

Browser family should be detected as GomezAgent or GomezA. But in this library it is getting detected as Chrome. This is what I am getting from this library:

{"browser":{"major":"46","name":"Chrome","version":"46.0.2490.71"},
"cpu":{"architecture":"amd64"},
"device":{},"engine":{"name":"WebKit","version":"537.36"},
"os":{"name":"Windows","version":"7"},
"ua":"Mozilla/5.0(WindowsNT6.1;WOW64)AppleWebKit/537.36(KHTML,likeGeckoGomezAgent3.0)Chrome/46.0.2490.71Safari/537.36"}	

Please see below python code for reference:

>>> uas = user_agent_parser.Parse("Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko GomezAgent 3.0) Chrome/46.0.2490.71 Safari/537.36")
>>> uas.get('device').get('family')                                                                                                    'Spider'
>>> uas.get('os').get('family')
'Windows 7'
>>> uas.get('user_agent').get('family')                                                                                                'GomezAgent'
@avdeev
Copy link

avdeev commented Dec 15, 2017

@hbohra Be free to create a PR

@faisalman
Copy link
Owner

Further discussion in #227

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants