From b98bf56da8c167fd4b2affd6cff094d87490fa0f Mon Sep 17 00:00:00 2001 From: Mark Beech Date: Mon, 23 Nov 2020 19:45:00 +0000 Subject: [PATCH 1/2] Deal with Octopus user agent --- raw/Exclusions.json | 2 +- raw/Exclusions.txt | 3 ++- src/Fixtures/Exclusions.php | 5 +++-- tests/devices.txt | 3 ++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/raw/Exclusions.json b/raw/Exclusions.json index 734e710..2f347bb 100644 --- a/raw/Exclusions.json +++ b/raw/Exclusions.json @@ -1 +1 @@ -["Safari.[\\d\\.]*","Firefox.[\\d\\.]*"," Chrome.[\\d\\.]*","Chromium.[\\d\\.]*","MSIE.[\\d\\.]","Opera\\\/[\\d\\.]*","Mozilla.[\\d\\.]*","AppleWebKit.[\\d\\.]*","Trident.[\\d\\.]*","Windows NT.[\\d\\.]*","Android [\\d\\.]*","Macintosh.","Ubuntu","Linux","[ ]Intel","Mac OS X [\\d_]*","(like )?Gecko(.[\\d\\.]*)?","KHTML,","CriOS.[\\d\\.]*","CPU iPhone OS ([0-9_])* like Mac OS X","CPU OS ([0-9_])* like Mac OS X","iPod","compatible","x86_..","i686","x64","X11","rv:[\\d\\.]*","Version.[\\d\\.]*","WOW64","Win64","Dalvik.[\\d\\.]*"," \\.NET CLR [\\d\\.]*","Presto.[\\d\\.]*","Media Center PC","BlackBerry","Build","Opera Mini\\\/\\d{1,2}\\.\\d{1,2}\\.[\\d\\.]*\\\/\\d{1,2}\\.","Opera"," \\.NET[\\d\\.]*","cubot","; M bot","; CRONO","; B bot","; IDbot","; ID bot","; POWER BOT"] \ No newline at end of file +["Safari.[\\d\\.]*","Firefox.[\\d\\.]*"," Chrome.[\\d\\.]*","Chromium.[\\d\\.]*","MSIE.[\\d\\.]","Opera\\\/[\\d\\.]*","Mozilla.[\\d\\.]*","AppleWebKit.[\\d\\.]*","Trident.[\\d\\.]*","Windows NT.[\\d\\.]*","Android [\\d\\.]*","Macintosh.","Ubuntu","Linux","[ ]Intel","Mac OS X [\\d_]*","(like )?Gecko(.[\\d\\.]*)?","KHTML,","CriOS.[\\d\\.]*","CPU iPhone OS ([0-9_])* like Mac OS X","CPU OS ([0-9_])* like Mac OS X","iPod","compatible","x86_..","i686","x64","X11","rv:[\\d\\.]*","Version.[\\d\\.]*","WOW64","Win64","Dalvik.[\\d\\.]*"," \\.NET CLR [\\d\\.]*","Presto.[\\d\\.]*","Media Center PC","BlackBerry","Build","Opera Mini\\\/\\d{1,2}\\.\\d{1,2}\\.[\\d\\.]*\\\/\\d{1,2}\\.","Opera"," \\.NET[\\d\\.]*","cubot","; M bot","; CRONO","; B bot","; IDbot","; ID bot","; POWER BOT","OCTOPUS-CORE"] \ No newline at end of file diff --git a/raw/Exclusions.txt b/raw/Exclusions.txt index 0ff8f60..9803f87 100644 --- a/raw/Exclusions.txt +++ b/raw/Exclusions.txt @@ -44,4 +44,5 @@ cubot ; B bot ; IDbot ; ID bot -; POWER BOT \ No newline at end of file +; POWER BOT +OCTOPUS-CORE \ No newline at end of file diff --git a/src/Fixtures/Exclusions.php b/src/Fixtures/Exclusions.php index e2af4e0..e21d09e 100644 --- a/src/Fixtures/Exclusions.php +++ b/src/Fixtures/Exclusions.php @@ -19,7 +19,7 @@ class Exclusions extends AbstractProvider * * @var array */ - protected $data = array( + protected $data = [ 'Safari.[\d\.]*', 'Firefox.[\d\.]*', ' Chrome.[\d\.]*', @@ -67,5 +67,6 @@ class Exclusions extends AbstractProvider '; IDbot', '; ID bot', '; POWER BOT', - ); + 'OCTOPUS-CORE', + ]; } diff --git a/tests/devices.txt b/tests/devices.txt index 104567c..66228b7 100644 --- a/tests/devices.txt +++ b/tests/devices.txt @@ -165633,4 +165633,5 @@ Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (K Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148/mdmzyvventykoptoospwivdhshkhvdyj Mozilla/5.0 (iPhone; CPU iPhone OS 12_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148/mvmkbtaqqdhshwcbsygjnuqcqmpndbrt Mozilla/5.0 (Linux; Android 5.0; SM-N9100 Build/LRX21V) > AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 > Chrome/37.0.0.0 Mobile Safari/537.36 > MicroMessenger/6.0.2.56_r958800.520 NetType/WIFI -Mozilla/5.0 (Linux; U; Android 5.0; en-US; SM-N900S;iPhone: Build/LRX21V) \ No newline at end of file +Mozilla/5.0 (Linux; U; Android 5.0; en-US; SM-N900S;iPhone: Build/LRX21V) +Mozilla/5.0 (Linux; Android 9; OCTOPUS-CORE T8 Build/PPR1.181005.003) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Mobile Safari/537.36 YaApp_Android/9.50/apad YaSearchBrowser/9.50 \ No newline at end of file From 719d5ae9510f545883a3a7c2fa9f8d2aa7c9f50f Mon Sep 17 00:00:00 2001 From: JayBizzle Date: Mon, 23 Nov 2020 19:45:43 +0000 Subject: [PATCH 2/2] Fix styling --- src/Fixtures/Exclusions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Fixtures/Exclusions.php b/src/Fixtures/Exclusions.php index e21d09e..8b35791 100644 --- a/src/Fixtures/Exclusions.php +++ b/src/Fixtures/Exclusions.php @@ -19,7 +19,7 @@ class Exclusions extends AbstractProvider * * @var array */ - protected $data = [ + protected $data = array( 'Safari.[\d\.]*', 'Firefox.[\d\.]*', ' Chrome.[\d\.]*', @@ -68,5 +68,5 @@ class Exclusions extends AbstractProvider '; ID bot', '; POWER BOT', 'OCTOPUS-CORE', - ]; + ); }