Can you tell whether the UA of a page is a normal browser (browser proxy) or a search spider through JS rather than server-side?

the user agent can be judged by the navigator object of BOM

navigator.userAgent

my browser returns
"" Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36 ""
is it possible to detect whether it is a Baidu spider or other spiders?

New version of Mobile ua:
Mozilla/5.0 (Linux;u;Android 4.2.2)
AppleWebKit/534.46 (KHTML,like Gecko) Version/5.1 Mobile Safari/10600.6.3
(compatible; Baiduspider/2.0; + ider.html" rel=" nofollow noreferrer "> http://www.baidu.com/search/s.)
PC ua:
Mozilla/5.0 (compatible; Baiduspider/2.0;) + ider.html" rel=" nofollow noreferrer "> http://www.baidu.com/search/s.)
Mar.01,2021

can be referenced, but UA can be written freely, so it is impossible to confirm whether the identity of the other party is real. I can also call myself Baidu / Google /.

Menu