Skip to content

Crawlers not getting type="crawler" #786

Answered by faisalman
stevenvachon asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, sorry for the delay, please try this:

import { UAParser } from 'ua-parser-js';
import { Bots } from 'ua-parser-js/extensions';
console.log(
  UAParser(
    'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36 (compatible; Google-Read-Aloud; +https://support.google.com/webmasters/answer/1061943)',
    Bots
  ).browser.type
); //-> "fetcher"

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@faisalman
Comment options

Answer selected by stevenvachon
@stevenvachon
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants