Questions tagged [ua-parser]

8 questions
2
votes
2 answers

Amazon Redshift UDF using custom Python library ua-parser

I want to use Python libraries to create UDF functions in Redshift, specifically ua-parser library. Process of using custom Python libraries on Redshift is described here http://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_LIBRARY.html In order…
1
vote
3 answers

UDF in Spark works very slow

I have a UDF in spark (running on EMR), written in scala that parses device from user agent using uaparser library for scala (uap-scala). When working on small sets it works fine (5000 rows) but when running on larger sets (2M) it works very slow.…
Nir Ben Yaacov
  • 1,182
  • 2
  • 17
  • 33
0
votes
1 answer

unit testing a react component with `ua-parser-js` plugin in jest and react testing library

I've create a very simple component which shows an image based on the os you are on (in my case iOS and Android) import { UAParser } from "ua-parser-js"; export const DownloadApp = ({ appleStoreUrl, playStoreUrl }: DownloadAppProps): JSX.Element =>…
Tom Maton
  • 1,564
  • 3
  • 23
  • 41
0
votes
1 answer

Why can I use import statements in libraries that only support CommonJS modules?

Ua-parser-js only supports the CommonJS module. And when exporting, the export statement is not found: if (typeof(exports) !== UNDEF_TYPE) { // nodejs env if (typeof module !== UNDEF_TYPE && module.exports) { exports…
0
votes
1 answer

.csv works fine, .tsv gives 'TypeError: expected string or buffer'

I'm working on a python script to parse user agent strings and reduce them down to just the 'family' (i.e., chrome, firefox, safari, etc). I've got a script that works completely fine when run against csv files, but when I run the files against .tsv…
r1ty
  • 45
  • 2
  • 5
0
votes
0 answers

Applying scala uaparser to a column of dataframe

How to apply scala uaparser to a column of a dataframe. Each row in the column in the dataframe is of the form - Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B206…
preitam ojha
  • 239
  • 1
  • 2
  • 7
0
votes
1 answer

Hive ua parser UDF gives IOException

I've useragent strings stored in String format. Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36 I want to extract browser from user agent strings. So i have used ua-parser-java…
Dhruv Kapatel
  • 873
  • 3
  • 14
  • 27
-1
votes
2 answers

How to use ua-parser-js in angular 4

I want os name, os version, browser name, browser version and device from the user agent. How can I use user agent parser js in my application in angular 4. I tried ng2-device-detector@1.0.0 but it doent return me the os version and device. Please…
Don
  • 37
  • 1
  • 4