This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Проверка по косвенным параметрам на бота\selenium\headless browser | |
* @function botDetection | |
* @return {Boolean} isBot flag | |
*/ | |
botDetection () { | |
let isBot = false, | |
rules = [ | |
//Phantomjs как правило, не имеет внутри себя браузерных плагинов | |
() => (navigator.plugins instanceof PluginArray) === false || navigator.plugins.length == 0, |