Extensions Submodule > Fetchers > Pinterestbot
Pinterestbot
- Developer: Pinterest
- BrowserType:
fetcher
User-Agent Examples
sh
Mozilla/5.0 (compatible; Pinterestbot/1.0; +http://www.pinterest.com/bot.html)Code Example
js
import { UAParser } from 'ua-parser-js';
import { Fetchers } from 'ua-parser-js/extensions';
import { Extension } from 'ua-parser-js/enums';
const fetcherParser = new UAParser(Fetchers);
const browser = fetcherParser.setUA('Mozilla/5.0 (compatible; Pinterestbot/1.0; +http://www.pinterest.com/bot.html)').getBrowser();
console.log(browser);
// {name: "Pinterestbot", version: "1.0", major: "1", type: "fetcher"}
// Compare using the built-in enum
const { Fetcher } = Extension.BrowserName;
console.log(browser.is(Fetcher.PINTEREST_BOT));
// true