Stores and randomly accesses a HTTP user agent from an available list of user agents in disk.
- Randomly β‘ pick between 899 unique user agents β
- HTTP user agents are stored πΎ in a disk file to avoid filling up your app's memory space β
- File disk reads are optimized π to only read as much as needed β
- Cache results using memoizee β
- Supports Bluebird π¦ promises β
npm install random-http-useragent -g
random-http-useragent
Get a random user agent
const RandomHttpUserAgent = require('random-http-useragent')
RandomHttpUserAgent.get()
.then((userAgent) => console.log(userAgent))
.catch((error) => console.error(error.message))
Cache returned user agents for 2 minutes
const RandomHttpUserAgent = require('random-http-useragent')
RandomHttpUserAgent.configure({ memoizee: { maxAge: 120000 } })
RandomHttpUserAgent.get()
.then((userAgent) => console.log(userAgent))
.catch((error) => console.error(error.message))
You can contribute either with code (e.g., new features, bug fixes and documentation) or by donating 5 EUR. You can read the contributing guidelines for instructions on how to contribute with code.
All donation proceedings will go to the Sverige fΓΆr UNHCR, a swedish partner of the UNHCR - The UN Refugee Agency, a global organisation dedicated to saving lives, protecting rights and building a better future for refugees, forcibly displaced communities and stateless people.
- request-on-steroids - An HTTP client β¨ with retry, circuit-breaker and tor support π¦ out-of-the-box
- facebook-login-for-robots - Facebook Login for π€ robots
- browser-as-a-service - A web browser π hosted as a service, to render your JavaScript web pages as HTML
- pollmommy - βοΈ Hack your π vote out of π Polldaddy surveys - used by π° BBC, Microsoft, Forbes, Pfizer, IBM
Read the license for permissions and limitations.