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

Netscape broke Chrome recognition #15

Open
andrewshkovskii opened this issue Feb 20, 2012 · 1 comment
Open

Netscape broke Chrome recognition #15

andrewshkovskii opened this issue Feb 20, 2012 · 1 comment

Comments

@andrewshkovskii
Copy link

For strings like :
Netscape(5.0 (Windows NT 6.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1)
Netscape(5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.237 Safari/534.10)
Netscape(5.0 (Windows NT 6.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1)
Netscape(5.0 (Windows NT 6.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1)
Netscape(5.0 (Windows NT 6.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1)
Netscape(5.0 (Windows NT 6.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1)

Simple_parse returning : Netscape ...
Fix Netscape recognition like this :

class Netscape(Browser):
look_for = "Netscape"
#--- if find 'Chrome' - browser type = 'Chrome' ---
def checkWords(self, agent):
unless_list = ["Chrome"]
if self.look_for in agent:
for word in unless_list:
if word in agent:
return False
return True

@shon
Copy link
Owner

shon commented Feb 23, 2012

Possible to send a patch? Really busy at this moment.

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

2 participants