Extensions Submodule > Fetchers
Fetchers
Extends browser detection to include bots that retrieve content from specific URLs on demand
TIP
Bots that automatically visit websites and collect data are categorized as Crawlers instead.
Code Example
js
import { UAParser } from 'ua-parser-js';
import { Fetchers } from 'ua-parser-js/extensions';
const fetcherParser = new UAParser(Fetchers);
const browser = fetcherParser
.setUA('Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534+ (KHTML, like Gecko) BingPreview/1.0b')
.getBrowser();
console.log(browser);
// {name: "BingPreview", version: "1.0b", major: "1", type: "fetcher"}