[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] [metrics-utils/master 2/4] Match full Torbutton user agents.



Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Thu, 25 Nov 2010 19:42:49 +0100
Subject: Match full Torbutton user agents.
Commit: 157c0dfe0722113bef50cea73be74600bde9414e

---
 visitor/visitor.py |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/visitor/visitor.py b/visitor/visitor.py
index 06288b1..466bd52 100644
--- a/visitor/visitor.py
+++ b/visitor/visitor.py
@@ -16,18 +16,18 @@ from cStringIO import StringIO
 # regexes used in the script
 IP_RE = re.compile(r'(\d+\.){3}\d+')
 APACHE_DATETIME = re.compile(r'\[(\d{2}/\w{3}/\d{4}:\d{2}:\d{2}:\d{2}) ([+-]\d{4})\]')
-TOR_USERAGENTS = [('torbutton1_2_0', re.compile(r'Mozilla/5\.0 \(Windows; U; Windows NT 5\.1; '
+TOR_USERAGENTS = [('torbutton1_2_0', re.compile(r'^"Mozilla/5\.0 \(Windows; U; Windows NT 5\.1; '
                                                 r'[a-z]{2}-[A-Z]{2}; rv\:1\.8\.1\.16\) '
-                                                r'Gecko/20080702 Firefox/2\.0\.0\.16')),
-                  ('torbutton1_2_0rc1', re.compile(r'Mozilla/5\.0 \(Windows; U; Windows NT 5\.1; '
+                                                r'Gecko/20080702 Firefox/2\.0\.0\.16"$')),
+                  ('torbutton1_2_0rc1', re.compile(r'^"Mozilla/5\.0 \(Windows; U; Windows NT 5\.1; '
                                                    r'en-US; rv\:1\.8\.1\.14\) '
-                                                   r'Gecko/20080404 Firefox/2\.0\.0\.14')),
-                  ('torbutton1_2_1', re.compile(r'Mozilla/5\.0 \(Windows; U; Windows NT 5\.1; '
+                                                   r'Gecko/20080404 Firefox/2\.0\.0\.14"$')),
+                  ('torbutton1_2_1', re.compile(r'^"Mozilla/5\.0 \(Windows; U; Windows NT 5\.1; '
                                                 r'en-US; rv\:1\.9\.0\.7\) '
-                                                r'Gecko/2009021910 Firefox/3\.0\.7')),
-                  ('torbutton1_2_5', re.compile(r'Mozilla/5\.0 \(Windows; U; Windows NT 6\.1; '
+                                                r'Gecko/2009021910 Firefox/3\.0\.7"$')),
+                  ('torbutton1_2_5', re.compile(r'^"Mozilla/5\.0 \(Windows; U; Windows NT 6\.1; '
                                                 r'[a-z]{2}-[A-Z]{2}; rv:1\.9\.2\.3\) '
-                                                r'Gecko/20100401 Firefox/3\.6\.3'))
+                                                r'Gecko/20100401 Firefox/3\.6\.3"$'))
                   ]
 
 
-- 
1.7.1