Crawlers not getting type="crawler" #786
-
Am I doing something wrong? I've tried all these: import { UAParser } from 'ua-parser-js';
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)'
).browser.type
); //-> undefined import { Crawlers, UAParser } from 'ua-parser-js';
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)',
[Crawlers]
).browser.type
); //-> undefined import { Crawlers, UAParser } from 'ua-parser-js';
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)',
Crawlers
).browser.type
); //-> undefined |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Hi, you must import it from the 'extensions' submodule: import { Crawlers } from 'ua-parser-js/extensions'; https://docs.uaparser.dev/api/submodules/extensions/crawlers.html#code-example |
Beta Was this translation helpful? Give feedback.
-
@faisalman same result, even when using the alternative syntax on that page ( |
Beta Was this translation helpful? Give feedback.
-
@faisalman any idea? |
Beta Was this translation helpful? Give feedback.
-
Hello? |
Beta Was this translation helpful? Give feedback.
Hi, sorry for the delay, please try this: