From 418e1bd406ffe924f7a307f5f327083a238ab666 Mon Sep 17 00:00:00 2001 From: Hideo Hattori Date: Mon, 1 Nov 2021 22:11:06 +0900 Subject: [PATCH 1/2] update woothee dataset --- woothee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/woothee b/woothee index 7ea09a7..998c6ec 160000 --- a/woothee +++ b/woothee @@ -1 +1 @@ -Subproject commit 7ea09a7bd37572119174832881e0c2506cb41791 +Subproject commit 998c6ecd1c6b0df770210ba18ca55ee3600e5b80 From 98789f64640b22f4409daccce2bfa638de5bfaa6 Mon Sep 17 00:00:00 2001 From: Hideo Hattori Date: Mon, 1 Nov 2021 22:11:28 +0900 Subject: [PATCH 2/2] android Firefox with os version --- lib/woothee/os.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/woothee/os.py b/lib/woothee/os.py index 0e382e0..cf5c130 100644 --- a/lib/woothee/os.py +++ b/lib/woothee/os.py @@ -129,6 +129,10 @@ def challenge_smartphone(ua, result): data = dataset.get('iPod') elif 'Android' in ua: data = dataset.get('Android') + regex = re.compile(r"Android[- ](\d+(?:\.\d+(?:\.\d+)?)?)") + m = regex.search(ua) + if m: + os_version = m.group(1) elif 'CFNetwork' in ua: data = dataset.get('iOS') elif 'BB10' in ua: