From eafb5243fa3856ab81cfd4a99d98965868a59e96 Mon Sep 17 00:00:00 2001 From: Ayumi Hamasaki Date: Thu, 11 Jun 2020 19:14:12 +0100 Subject: [PATCH] Nimbostratus Bot Added Nimbostratus bot it's quite common on the internet. As per request: https://github.com/WhichBrowser/Parser-PHP/issues/100#issuecomment-624314133 --- data/applications-bots.php | 1 + data/regexes/applications-bots.php | 2 +- tests/data/bots/generic.yaml | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/data/applications-bots.php b/data/applications-bots.php index 322e1c506..1ed7a286b 100644 --- a/data/applications-bots.php +++ b/data/applications-bots.php @@ -161,6 +161,7 @@ [ 'name' => 'NewsGator', 'id' => 'newsgator', 'regexp' => '/NewsGator\/([0-9.]*)/u' ], [ 'name' => 'NewsGator', 'id' => 'newsgator', 'regexp' => '/NewsGatorOnline\/([0-9.]*)/u' ], [ 'name' => 'NewsGator FetchLinks', 'id' => 'newsgator', 'regexp' => '/NewsGator FetchLinks extension\/([0-9.]*)/u' ], + [ 'name' => 'Nimbostratus', 'id' => 'nimbostratus', 'regexp' => '/Nimbostratus-Bot\/v([0-9.]*)/u' ], [ 'name' => 'OpenWebSpider', 'id' => 'spider', 'regexp' => '/OpenWebSpider v([0-9.]*)/u' ], [ 'name' => 'OrangeBot', 'id' => 'orange', 'regexp' => '/OrangeBot-Collector\/([0-9.]*)/u' ], [ 'name' => 'OrangeBot', 'id' => 'orange', 'regexp' => '/OrangeBot-Mobile/u' ], diff --git a/data/regexes/applications-bots.php b/data/regexes/applications-bots.php index 740a281b8..cacc63731 100644 --- a/data/regexes/applications-bots.php +++ b/data/regexes/applications-bots.php @@ -2,4 +2,4 @@ namespace WhichBrowser\Data; -Applications::$BOTS_REGEX = '/(008|360|a6|abound|muncher|adaxas|addthis|admantx|ahrefsbot|archiver|altavista|curious|cloudfront|amorank|archive|jeeves|astra|backlink|baidu|bazqux|bingbot|msnbot|msmobot|bing|blogbridge|bloglines|bloglovin|blogpulse|blogram|blogtrot|blogshares|boardreader|browsershots|bubing|butterfly|heritrix|cliqz|cloudflare|comodo|commafeed|cbot|watchdog|datasearch|daumoa|digg|domain|exabot|exactseek|ezooms|facebook|fast|flamingo|fastladder|feed|wrangler|validator|fever|friendica|robot|genieo|fetchor|google|gomez|ichiro|gooblog|goorss|grammarly|grub|hatena|capture|heureka|htdig|httpmon|hubpages|spider|crawler|kouio|larbin|linkedin|linkdex|livedoor|ltx71|magpie|mapion|socialstreams|mixi|mnogo|monitor|yeti|netcraft|netvibes|newsblur|newsgator|orange|pages|psbot|pingdom|pinterest|postrank|python|comment|rssbar|hunter|quora|safesearch|scrapy|seznam|shopwiki|reader|simplepie|site24|sogou|sophora|soso|spdycheck|spinn|detector|summify|telegram|twisted|twitter|tiny|tlsprober|typhoeus|vagabondo|voila|vocus|mcrawler|w3bot|jigsaw|w3c|wayback|webindexer|wordpress|mechanize|xerka|sitemap|yacy|yandex|yahoo|y\!j|slurp|httpclient|nutch|synapse|indy|wget|curl|package|java|simple|libwww|lwp|urllib|php|pear|zend|ruby)/i'; +Applications::$BOTS_REGEX = '/(008|360|a6|abound|muncher|adaxas|addthis|admantx|ahrefsbot|archiver|altavista|curious|cloudfront|amorank|archive|jeeves|astra|backlink|baidu|bazqux|bingbot|msnbot|msmobot|bing|blogbridge|bloglines|bloglovin|blogpulse|blogram|blogtrot|blogshares|boardreader|browsershots|bubing|butterfly|heritrix|cliqz|cloudflare|comodo|commafeed|cbot|watchdog|datasearch|daumoa|digg|domain|exabot|exactseek|ezooms|facebook|fast|flamingo|fastladder|feed|wrangler|validator|fever|friendica|robot|genieo|fetchor|google|gomez|ichiro|gooblog|goorss|grammarly|grub|hatena|capture|heureka|htdig|httpmon|hubpages|spider|crawler|kouio|larbin|linkedin|linkdex|livedoor|ltx71|magpie|mapion|socialstreams|mixi|mnogo|monitor|yeti|netcraft|netvibes|newsblur|newsgator|nimbostratus|orange|pages|psbot|pingdom|pinterest|postrank|python|comment|rssbar|hunter|quora|safesearch|scrapy|seznam|shopwiki|reader|simplepie|site24|sogou|sophora|soso|spdycheck|spinn|detector|summify|telegram|twisted|twitter|tiny|tlsprober|typhoeus|vagabondo|voila|vocus|mcrawler|w3bot|jigsaw|w3c|wayback|webindexer|wordpress|mechanize|xerka|sitemap|yacy|yandex|yahoo|y\!j|slurp|httpclient|nutch|synapse|indy|wget|curl|package|java|simple|libwww|lwp|urllib|php|pear|zend|ruby)/i'; diff --git a/tests/data/bots/generic.yaml b/tests/data/bots/generic.yaml index fdce84702..01b9160a1 100644 --- a/tests/data/bots/generic.yaml +++ b/tests/data/bots/generic.yaml @@ -514,3 +514,7 @@ headers: 'User-Agent: Pinterest/0.2 (+http://www.pinterest.com/)' readable: 'Pinterest 0.2' result: { browser: { name: Pinterest, version: '0.2' }, device: { type: bot } } +- + headers: 'User-Agent: Mozilla/5.0 (compatible; Nimbostratus-Bot/v1.3.2; http://cloudsystemnetworks.com)' + readable: 'Nimbostratus 1.3.2' + result: { browser: { name: Nimbostratus, version: '1.3.2' }, device: { type: bot } }