Merge pull request #52 from LiCaoZ/master

拓宽 UA 匹配
This commit is contained in:
そら 2022-01-20 15:47:00 +08:00 committed by GitHub
commit 61963e9c4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,6 +54,11 @@ class Access_UA {
'Fish search',
'crawler',
'bingbot',
'DNSPod-Monitor', // DNSPod D监控
'Reeder', // RSS 阅读器
'Tiny Tiny RSS', // RSS 阅读器
'inoreader', // RSS 阅读器
'python-requests',
);
private $ua;
@ -262,7 +267,7 @@ class Access_UA {
} elseif (preg_match('#Maxthon( |\/)([a-zA-Z0-9.]+)#i', $this->ua, $matches)) {
$this->browserID = $this->browserName = 'Maxthon';
$this->browserVersion = $matches[2];
} elseif (preg_match('#Edge/([a-zA-Z0-9.]+)#i', $this->ua, $matches)) {
} elseif (preg_match('#Edg/([a-zA-Z0-9.]+)#i', $this->ua, $matches)) {
$this->browserID = $this->browserName = 'Edge';
$this->browserVersion = $matches[1];
} elseif (preg_match('#Chrome/([a-zA-Z0-9.]+)#i', $this->ua, $matches)) {